You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What configuration values are you using for Sarama and Kafka?
defaults
Logs
Logs aren’t especially important here (not a bug), except to say that the relevant error is kafka server: Message was too large, server rejected it to avoid allocation error.
Problem Description
When the message size exceedsProducer.MaxMessageBytes, the error message indicates that the error is coming from the Kafka server, when in fact it’s a Producer error.
In our application, we recently spent a fair amount of time working with a customer, chasing down this issue -- we unproductively focused on the server while the error was in our software. cockroachdb/cockroach#76258. The downstream server had a very large max message size (hundreds of MB), but the errors persisted, and it took a while to recognize that Producer.MaxMessageBytes (defaulted to 1MB) was the culprit.
We’d like to see a more accurate and descriptive error message.
Thanks for the consideration, I can mock up a PR to illustrate a preferred solution if it would be helpful.
The text was updated successfully, but these errors were encountered:
For most of this library's existence it has returned ErrMessageSizeTooLarge
when the message exceeded the configured size.
For a short period in 2019 this error was renamed (IBM#1218) but shortly
revered back (IBM#1262). Later in 2023 this error was changed to a
ConfigurationError (IBM#2628) to fixIBM#2137, however this has caused issues
with clients who rely on the previous error code being distinct from
other ConfigurationError conditions (IBM#2655).
This commit reverts to previous behaviour, and adds a test to pickup if
this changes again in the future.
Signed-off-by: Adam Eijdenberg <adam.eijdenberg@defence.gov.au>
Versions
Configuration
What configuration values are you using for Sarama and Kafka?
defaults
Logs
Logs aren’t especially important here (not a bug), except to say that the relevant error is
kafka server: Message was too large, server rejected it to avoid allocation error.
Problem Description
When the message size exceeds
Producer.MaxMessageBytes
, the error message indicates that the error is coming from the Kafka server, when in fact it’s a Producer error.In our application, we recently spent a fair amount of time working with a customer, chasing down this issue -- we unproductively focused on the server while the error was in our software. cockroachdb/cockroach#76258. The downstream server had a very large max message size (hundreds of MB), but the errors persisted, and it took a while to recognize that
Producer.MaxMessageBytes
(defaulted to 1MB) was the culprit.We’d like to see a more accurate and descriptive error message.
Thanks for the consideration, I can mock up a PR to illustrate a preferred solution if it would be helpful.
The text was updated successfully, but these errors were encountered: