aiokafka icon indicating copy to clipboard operation
aiokafka copied to clipboard

[QUESTION] Is UnknownProducerId not included in __all__ intentionally or just by accident?

Open paulefoa opened this issue 2 years ago • 2 comments

Should I catch UnknownProducerId or BrokerResponseError in my code?

https://github.com/aio-libs/aiokafka/blob/master/aiokafka/errors.py#L318

paulefoa avatar Nov 16 '21 15:11 paulefoa

This depends on your intent: except UnknownProducerId works only this specific error, while except BrokerResponseError catches exception for all error responses.

ods avatar Feb 05 '22 12:02 ods

For UnknownProducerId I want to just reconnect to the kafka. If the same applies to BrokerResponseError I'd be glad to catch that one.

paulefoa avatar Feb 07 '22 15:02 paulefoa

What version of kafka did you get this error? It should be fixed in 2.5.0.

ods avatar Jul 20 '23 12:07 ods