DBZ-1719 Create an ErrorHandler for Capturing destinations#68
Open
KMohnishM wants to merge 1 commit into
Open
Conversation
Author
|
@kmos Could You please review the PR when you get some time , Thanks ! |
Member
|
@KMohnishM sorry for the late reply but I wasn't convinced by your last message. My concern related your proposal is that you are exposing to the user the |
kmos
requested changes
Jul 8, 2026
kmos
left a comment
Member
There was a problem hiding this comment.
please take a look to: #68 (comment)
Signed-off-by: KMohnishM <kmohnishm@gmail.com>
Author
|
Hi @kmos, Thank you for the feedback! I have refactored the implementation to use only the Quarkus Extensions API:
Please let me know what you think when you have a moment. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Fixes debezium/dbz#1719
Currently, when change events are captured and sent to destinations, there is no built-in mechanism to capture/handle transient exceptions or apply custom retries. This PR introduces an
ErrorHandlerinterface and a default exponential backoff retry mechanism to capture exceptions and gracefully retry event consumption.Proposed Changes
debezium-quarkus-engine-spi):DebeziumEngineConfiguration.Capturingunder default interface methods returningOptional.empty()for backward compatibility:quarkus.debezium.capturing.error-handler(name or class of the custom handler)quarkus.debezium.capturing.error-handling.max-retriesquarkus.debezium.capturing.error-handling.initial-delay-msquarkus.debezium.capturing.error-handling.max-delay-msquarkus.debezium.capturing.error-handling.delay-multiplierdebezium-quarkus-engine):ErrorHandlerInterface: Introduced to wrap change consumers. Provides default no-op methods for both batch-oriented (QuarkusChangeConsumer) and single-record-oriented (SourceRecordEventConsumer) capture interfaces.DefaultRetryErrorHandler: Implements exponential backoff retry loop using the configured delay settings.DefaultChangeConsumerFactoryandSourceRecordEventProducerto resolve the CDI bean / default error handler and wrap the respective change consumers.GeneralChangeConsumerProducer.io.debezium:debezium-configdependency to the engine runtimepom.xmlto fix missing class errors (io.debezium.config.Configuration) caused by the split ofdebezium-commonintodebezium-utilanddebezium-config.Verification & Testing
Added three new test classes verifying all aspects of the error handling and retry mechanism:
DefaultRetryErrorHandlerTest: Verifies retry counts, backoff delay increases, recovery, and final exhaustion propagation for both batch and single event interfaces.DefaultChangeConsumerFactoryTest: Verifies that the factory wraps the batch consumer in the resolved error handler.SourceRecordEventProducerTest: Verifies that the producer wraps the single-event consumer in the resolved error handler.All 32 modules build and pass tests cleanly.