-
Notifications
You must be signed in to change notification settings - Fork 14.5k
KAFKA-19283: Update transaction exception handling documentation #19931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
docs/design.html
Outdated
@@ -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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit: can we share which exceptions bubble up to the application and which don't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed feedback in commit 638a212
docs/design.html
Outdated
<li><strong>RefreshRetriableException</strong>: Exceptions requiring metadata refresh before retry. These are handled internally by the client after refreshing metadata and don't bubble up to the application.</li> | ||
<li><strong>AbortableException</strong>: Exceptions that require transaction abort and reprocessing. These bubble up to the application, which must handle them by aborting the transaction and resetting the consumer position.</li> | ||
<li><strong>ApplicationRecoverableException</strong>: Exceptions that bubble up to the application and require application handling. The application must implement its own recovery strategy, which must include restarting the producer.</li> | ||
<li><strong>InvalidConfigurationException</strong>: Configuration-related exceptions that bubble up to the application and require application handling and producer restart.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we decide that these require producer restart still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected in commit 083bccc
Producer doesn't necessary need to restart, as it might be fixed by simple retry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Can we now close https://issues.apache.org/jira/browse/KAFKA-19283 and https://issues.apache.org/jira/browse/KAFKA-16906? |
ping @jolshan |
@mimaison Sorry missed your ping on PR. |
…che#19931) Added docs on Enhancements to transactional producer error handling: * Added standardized exception categories (`RetriableException`, `RefreshRetriableException`, `AbortableException`, `ApplicationRecoverableException`, `InvalidConfigurationException`, `KafkaException`) to ensure clearer error handling patterns. * Included a link to example template code for handling transaction exceptions: [Transaction Client Demo](https://github.com/apache/kafka/blob/trunk/examples/src/main/java/kafka/examples/TransactionalClientDemo.java). Reviewers: Justine Olshan <jolshan@confluent.io>
Added docs on Enhancements to transactional producer error handling:
RetriableException
,RefreshRetriableException
,AbortableException
,ApplicationRecoverableException
,InvalidConfigurationException
,KafkaException
) to ensure clearer error handling patterns.exceptions: Transaction Client
Demo.
Reviewers: Justine Olshan jolshan@confluent.io