Comments (2)
@dgregoire are you able to share which version of Kafka you had done these tests against, as well as the number of brokers and partitions in the topic? The writer definitely shouldn't block until the deadline is reached, because we have tests that verify its behavior.
If it timed out due to reaching the context deadline you should be getting en error returned from the (*Writer).WriteMessages
call, is this what you observed? (seems like it from your screenshot but I just wanted to confirm)
A batch size of 2 is quite small, I would expect this to put significant load on the Kafka brokers, which means some requests could timeout if there is concurrency involved and you hit hardware limits on the underlying hardware (like disk bandwidth, IOPS, CPU, etc...).
from kafka-go.
@achille-roussel Kafka 1.0.1 with 3 brokers, 12 partitions / topic.
The specific use case is:
- default batch size of
5/2
- context with timeout in 100/200/500ms
WriteMessages()
with 1kafka.Message
In all combinaisons I tested, the WriteMessages
function locks until the context is deadline exceeded and the function returns that error, unless the configured batch size is 1
.
I suspected this might happen when using send messages with a number of message != batch size but never proved that theory, what do you think?
from kafka-go.
Related Issues (20)
- `reader.Close()` stuck randomly HOT 1
- Make `(msg *Message) totalSize()` public
- Asynchronous mode in kafka package not working
- Duplicate consumption occurs when join a new consumer and CommitInterval is configured HOT 1
- After increasing partition count, consumer group is not assigned to the new partitions. HOT 1
- Observability : Kafka Consumer/Producer metrics and tracing.
- Subscribe topic on demand
- A new method for Batch called ReadIntoMessage
- authorization retries
- What is the difference between kafka.NewConsumerGroup and kafka.NewReader,
- What is QueueCapacity param ?
- Offset is going ahead and we are missing message with lag HOT 3
- How do I specify partition when producing messages,I want to implement ordered messages HOT 1
- AllowAutoTopicCreation does not exist in writer config, but only in the writer struct HOT 1
- Go1.16 cannot run tests HOT 2
- Feture request: logger with different levels HOT 1
- Issue: Getting half partitions while Consumer Group Migration
- Do not panic on errors
- Making the producer backoff algorithm configurable
- a lot of unexpected EOF error when reading from partition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafka-go.