-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
delivery callbacks for batch production #88
Comments
Ah, I see. That's a little inconvenient. I'm curious: why is batch production pointless without "extreme throughput"? What does @edenhill classify as "extreme"? That would be useful to know, because at work we may end up switching to single-message depending on our needs. Batch production was just slightly easier in our case. |
OK, here is my understanding. I think it just means that As I said, There could be other micro-optimisations for batches. But the point is that when we do other stuff in our applications, it should hardly be the case that we are limited by the difference between single- and batch- producing. So I decided that if I need to push many millions of messages as quick as possible, I'll re-visit batching and measure it again to see what batching really squeezes out of it. But I haven't been to that situation yet :) |
@chessai if you have big throughputs, it would be interesting to see the difference between batching and single-messages. If you end up measuring it, please let me know about your results! :) |
@AlexeyRaga is completely right, the batch API is just a slightly more optimized enqueuing interface for some specific use-cases (large chunks of pre-partitioned messages for instance). For the common case (use partitioner) it is not any faster than the single-message API, and lacks support for new field types such as headers and timestamps (see rd_kafka_producev()). |
@AlexeyRaga @edenhill awesome, thanks for the thorough explanations. |
when producing a message batch, there's no way to have a delivery callback that operates on the entire batch. currently callbacks only work on a single
DeliveryReport
, which only assumes single-message. Perhaps I'd like to know about the individual messages, but perhaps I'd also like the callback to tell me what the size of the batch was, or maybe even more sophisticated statistics? i can do this before i send it, but most of the time i don't care what these statistics are, and i would rather only see them upon some kind of delivery failure.The text was updated successfully, but these errors were encountered: