SendBatchFailedContext Class

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

public final class SendBatchFailedContext

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.

Constructor Summary

Constructor Description
SendBatchFailedContext(Iterable<EventData> events, String partitionId, Throwable throwable)

Creates a new instance.

Method Summary

Modifier and Type Method and Description
Iterable<EventData> getEvents()

Gets the events that failed to send.

String getPartitionId()

Gets the partition id that the failed batch went to.

Throwable getThrowable()

Gets the error that occurred when sending the batch.

Methods inherited from java.lang.Object

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.

Applies to