Class EventPublishingException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.zalando.fahrschein.EventPublishingException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EventValidationException, RawEventPersistenceException

public abstract class EventPublishingException extends IOException

Base class for exceptions thrown when publishing events to Nakadi.

The exception will contain an array of all BatchItemResponses, independent of their status. There is an ordering guarantee from Nakadi, so that you can correlate the elements in the response with your input batch, and potentially retry only the failed or aborted events. Every record includes the eid (event id) which can also be used to identify the event.

Based on the exception, the batch can be retried or not. Partially successfully published batches are retryable (see EventPersistenceException), while batches rejected as unprocessable entities are not (see EventValidationException).

See Also:
  • Constructor Details

    • EventPublishingException

      public EventPublishingException(BatchItemResponse[] responses)
  • Method Details

    • getResponses

      public BatchItemResponse[] getResponses()
      Returns:
      individual responses for each item in the batch.