aiokafka
aiokafka copied to clipboard
[QUESTION] Is UnknownProducerId not included in __all__ intentionally or just by accident?
Should I catch UnknownProducerId or BrokerResponseError in my code?
https://github.com/aio-libs/aiokafka/blob/master/aiokafka/errors.py#L318
This depends on your intent: except UnknownProducerId
works only this specific error, while except BrokerResponseError
catches exception for all error responses.
For UnknownProducerId
I want to just reconnect to the kafka. If the same applies to BrokerResponseError
I'd be glad to catch that one.
What version of kafka did you get this error? It should be fixed in 2.5.0.