vamossagar12 opened a new pull request, #12512:
URL: https://github.com/apache/kafka/pull/12512

   Currently the producer.send() method has different mechanisms of throwing 
exceptions when EOS is enabled and when it is not. Furthermore, the exceptions 
returned in callbacks are also different at times which could lead to 
confusion. This PR aims to close the confusion by following one of the 
methodologies of 
[KIP-691](https://cwiki.apache.org/confluence/display/KAFKA/KIP-691%3A+Enhance+Transactional+Producer+Exception+Handling#KIP691:EnhanceTransactionalProducerExceptionHandling-UnifyWrappedKafkaException).
 
   
   It wraps all non-fatal exceptions in`KafkaException` and throws fatal 
exceptions directly. It does the same for all styles of producer.send() 
variations(EOS/non-EOS/callback/future.get()).
   
   To get the PR working, needed to make some test changes. There were places 
where `AuthorizationException` was wrapped in `KafkaException`. I removed those 
checks which made the tests working. This is what exactly the PR was aiming 
for. I didn't add more tests right now. If reviewers feel so, can add for sure.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to