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.

@FunctionalInterface public interface JobStreamErrorHandler
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 Type
    Method
    Description
    void
    handleError(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

      void handleError(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.

      Implementations should use the given TaskResultBuilder to append followup commands to the same partition as the job's.

      Parameters:
      job - the activated job which should have been pushed
      error - the last error which caused the failure
      resultBuilder - the result builder on which you can add followup commands to be processed