jolshan commented on code in PR #19931:
URL: https://github.com/apache/kafka/pull/19931#discussion_r2135998371
##########
docs/design.html:
##########
@@ -340,6 +340,18 @@ <h3 class="anchor-heading"><a id="usingtransactions"
class="anchor-link"></a><a
transactions. However, in the event of a transaction abort, the
application's state and in particular the current position of the consumer must
be reset explicitly so that it can
reprocess the records processed by the aborted transaction.
<p>
+ The error handling for transactional producer has been standardized which
ensures consistent behavior and clearer error handling patterns. The exception
categories are now more precisely defined:
+ <ol>
+ <li><strong>RetriableException</strong>: Temporary exceptions that are
retried automatically by the client. These are handled internally and don't
require application intervention.</li>
+ <li><strong>RefreshRetriableException</strong>: Exceptions requiring
metadata refresh before retry. These are also handled automatically by the
client after refreshing metadata.</li>
+ <li><strong>AbortableException</strong>: Exceptions that require
transaction abort and reprocessing. The application must handle these by
aborting the transaction and resetting the consumer position.</li>
+ <li><strong>ApplicationRecoverableException</strong>: Exceptions that
require application handling and producer restart. The application must
implement its own recovery strategy.</li>
Review Comment:
Can we also include that the producer must be restarted as part of that
recovery?
##########
docs/design.html:
##########
@@ -340,6 +340,18 @@ <h3 class="anchor-heading"><a id="usingtransactions"
class="anchor-link"></a><a
transactions. However, in the event of a transaction abort, the
application's state and in particular the current position of the consumer must
be reset explicitly so that it can
reprocess the records processed by the aborted transaction.
<p>
+ The error handling for transactional producer has been standardized which
ensures consistent behavior and clearer error handling patterns. The exception
categories are now more precisely defined:
+ <ol>
+ <li><strong>RetriableException</strong>: Temporary exceptions that are
retried automatically by the client. These are handled internally and don't
require application intervention.</li>
+ <li><strong>RefreshRetriableException</strong>: Exceptions requiring
metadata refresh before retry. These are also handled automatically by the
client after refreshing metadata.</li>
+ <li><strong>AbortableException</strong>: Exceptions that require
transaction abort and reprocessing. The application must handle these by
aborting the transaction and resetting the consumer position.</li>
+ <li><strong>ApplicationRecoverableException</strong>: Exceptions that
require application handling and producer restart. The application must
implement its own recovery strategy.</li>
Review Comment:
Can we also include that the producer must be restarted as part of that
recovery?
--
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]