Udostępnij za pośrednictwem


EventDataBatch Class

Definition

A set of EventData with size constraints known up-front, intended to be sent to the Event Hubs service in a single operation. When published, the result is atomic; either all events that belong to the batch were successful or all have failed. Partial success is not possible.

public sealed class EventDataBatch : IDisposable
type EventDataBatch = class
    interface IDisposable
Public NotInheritable Class EventDataBatch
Implements IDisposable
Inheritance
EventDataBatch
Implements

Remarks

The operations for this class are thread-safe and will prevent changes when actively being published to the Event Hubs service.

Properties

Count

The count of events contained in the batch.

MaximumSizeInBytes

The maximum size allowed for the batch, in bytes. This includes the events in the batch as well as any overhead for the batch itself when sent to the Event Hubs service.

SizeInBytes

The size of the batch, in bytes, as it will be sent to the Event Hubs service.

Methods

Dispose()

Performs the task needed to clean up resources used by the EventDataBatch.

TryAdd(EventData)

Attempts to add an event to the batch, ensuring that the size of the batch does not exceed its maximum.

Applies to