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
{{ message }}
This repository was archived by the owner on Mar 24, 2021. It is now read-only.
When debugging #696 where the broker successfully returns a message to the consumer and then the consumer blows up, I was confused because the error that was raised was MessageSizeTooLarge which is a broker error code number 10: https://kafka.apache.org/protocol.html#protocol_error_codes
This was extremely confusing to me because initial spelunking in the pykafka source showed that this exception subclassed ProtocolClientError, indicating that the broker was returning the error code:
Furthermore, it made no sense contextually because that error code is only emitted by the broker to a producer trying to produce too large of a message, not to a consumer.
Digging a little deeper, I see that originally this exception wasn't the same as a broker-side error, but in #500 @emmett9001 changed it to re-use that exception class based on discussion in #497.
Can I request that you limit the use of broker-side exceptions to only situations where the broker is actually returning an error code?
In this particular case, the proper fix is probably removing this particular usage of the exception altogether as suggested in #696. If you choose to keep it a hard-limit and throw an exception, can you use an exception that more clearly indicates a client-side error? Probably with a suggestion to the user to increase their fetch_message_max_bytes setting.