Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Several default implementations of the interface will be provided:

  • An implementation that just logs the error to the log file:

    Code Block
    languagejava
    public class LogRecordExceptionHandler implements RecordExceptionHandler {...}
  • An implementation that logs the error and stops the processing altogether:

    Code Block
    languagejava
    public class LogAndFailExceptionHandler implements RecordExceptionHander {...}
  • An implementation that logs the error and stops processing if a % of records have failed where the % can be configured through a "configure" method:

    Code Block
    languagejava
    public class LogAndThresholdExceptionHandler implements RecordExceptionHandler {...}

     

Note that in all cases, the streams pipeline skips over the record after the handler is called (unless the handler stops the pipeline).  Contrast this with other possible options as described in Rejected Alternatives below.

...