rust-rdkafka icon indicating copy to clipboard operation
rust-rdkafka copied to clipboard

FutureProducer bulk sending without reordering on queue full errors

Open dtheodor opened this issue 3 years ago • 1 comments

I'm trying to produce several messages and would like to maintain their order as much as Kafka allows. If I am reading things correctly, when using FutureProducer::send, queue full errors will result in re-trying to enqueue, but the original order of sending is lost. So the built-in retry logic adds another possible point where reordering can happen.

I suppose I could implement this using FutureProducer::send_result with custom retry logic to maintain order. I think this kind of enhancement would be valuable to have within the library itself.

dtheodor avatar May 05 '22 10:05 dtheodor

Hello @dtheodor !

If I am reading things correctly, when using FutureProducer::send, queue full errors will result in re-trying to enqueue, but the original order of sending is lost

that's correct

I suppose I could implement this using FutureProducer::send_result with custom retry logic to maintain order. I think this kind of enhancement would be valuable to have within the library itself.

Yes, you could implement your own retry logic on top of send_result. Is the goal here to contribute a custom retry logic that maintains order on queue full errors? How are you planning to implement that?

scanterog avatar May 10 '22 13:05 scanterog