ruby-kafka icon indicating copy to clipboard operation
ruby-kafka copied to clipboard

MessageSizeTooLargeException causes infinite delivery loop in async producer

Open astudnev opened this issue 4 years ago • 1 comments

If this is a bug report, please fill out the following:

  • Version of Ruby: 2.6
  • Version of Kafka: do not know
  • Version of ruby-kafka: 1.3.0

I have an issue of infiinte re-sending batch of messages if any message in batch causes MessageSizeTooLargeException.

I use async producer. In this case, the batch is re-sending as a whole , and it continues forever.

As a result, some messages are delivered more than once, thousands of times

astudnev avatar Mar 13 '21 12:03 astudnev

Handling MessageSizeTooLargeException correctly is tricky, and we've yet to find a single, one-size-fits-all solution. I would advice trying to find the message that's causing the problem and skipping it. Unfortunately, the error sent back by the Kafka broker doesn't indicate which message was too large.

dasch avatar Mar 17 '21 15:03 dasch

Issue has been marked as stale due to a lack of activity.

github-actions[bot] avatar Jun 17 '23 00:06 github-actions[bot]