Send events to error handlers when broker is unavailable #144
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.
Purpose
Resolves #143
This is a new improvement.
Currently when the broker is not available, kafka producer will retry sending the event, but if the broker does not become available during that retry period, the event will be dropped.
After this improvement, such events can be redirected to Siddhi Error Handlers (STREAM/STORE/WAIT).
Goals
Add Error handling support for Kafka Sink
Approach
Throw ConnectionUnavailableException when TimeoutException occurrs.
Sample Configuration
Please refer sample siddhi app below. Here, when the broker is not available, we have specified to redirect the events to Error Store (
on.error='STORE'
)Release note
Add Siddhi error handling (Stream/Store/Wait) support for Kafka Sink
Documentation
General Siddhi doc for error handling is applicable for the Kafka Sink as well.
Automation tests
Security checks
Related PRs
Below PR needs to be merged for this feature to work properly - siddhi-io/siddhi#1755
Migrations (if applicable)
None.
Test environment
SI 4.0.0
kafka_2.11-0.10.2.1
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)