Interface JobStreamErrorHandler
- All Known Implementing Classes:
YieldingJobStreamErrorHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The
JobStreamErrorHandler allows specifying logic which should be executed whenever the
broker fails to push a job to one of the open streams.
Implementations can then produce followup records to be appended to the log in order to perform any actions (e.g. yield the job).
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(ActivatedJob job, Throwable error, TaskResultBuilder resultBuilder) Called when a previously activated job, which was supposed to be pushed, cannot be pushed due to some error.
-
Method Details
-
handleError
Called when a previously activated job, which was supposed to be pushed, cannot be pushed due to some error.Implementations should use the given
TaskResultBuilderto append followup commands to the same partition as the job's.- Parameters:
job- the activated job which should have been pushederror- the last error which caused the failureresultBuilder- the result builder on which you can add followup commands to be processed
-