Class SendBatchFailedContext

java.lang.Object
com.azure.messaging.eventhubs.models.SendBatchFailedContext

public final class SendBatchFailedContext extends Object
Contains information about a batch that was unable to be published, as well as the exception that occurred and the partition that the batch was being published to.
See Also:
  • Constructor Details

    • SendBatchFailedContext

      public SendBatchFailedContext(Iterable<EventData> events, String partitionId, Throwable throwable)
      Creates a new instance.
      Parameters:
      events - Events associated with the failed batch.
      partitionId - Partition that the events went to.
      throwable - Error associated with the failed batch.
  • Method Details

    • getEvents

      public Iterable<EventData> getEvents()
      Gets the events that failed to send.
      Returns:
      The events that failed to send.
    • getPartitionId

      public String getPartitionId()
      Gets the partition id that the failed batch went to.
      Returns:
      The partition id that the failed batch went to.
    • getThrowable

      public Throwable getThrowable()
      Gets the error that occurred when sending the batch.
      Returns:
      The error that occurred when sending the batch.