Table of Contents

Class MessageBatch

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.Transport.Abstractions.dll

Represents a batch of messages for processing.

public sealed class MessageBatch
Inheritance
MessageBatch
Inherited Members
Extension Methods

Properties

BatchId

Gets or sets the batch ID.

public string BatchId { get; set; }

Property Value

string

The batch ID.

CreatedAt

Gets or sets when the batch was created.

public DateTimeOffset CreatedAt { get; set; }

Property Value

DateTimeOffset

The current CreatedAt value.

IsEmpty

Gets a value indicating whether the batch is empty.

public bool IsEmpty { get; }

Property Value

bool

The current IsEmpty value.

MaxProcessingTime

Gets or sets the maximum processing time for this batch.

public TimeSpan? MaxProcessingTime { get; set; }

Property Value

TimeSpan?

The current MaxProcessingTime value.

Messages

Gets or sets the messages in the batch.

public IReadOnlyList<TransportMessage> Messages { get; set; }

Property Value

IReadOnlyList<TransportMessage>

The messages in the batch.

Metadata

Gets the batch metadata.

public Dictionary<string, string> Metadata { get; }

Property Value

Dictionary<string, string>

The current Metadata value.

Priority

Gets or sets the batch priority.

public BatchPriority Priority { get; set; }

Property Value

BatchPriority

The current Priority value.

Size

Gets the size of the batch.

public int Size { get; }

Property Value

int

The current Size value.

SizeInBytes

Gets the total size in bytes.

public long SizeInBytes { get; }

Property Value

long

The total size in bytes.

Source

Gets or sets the batch source.

public string? Source { get; set; }

Property Value

string

The current Source value.

Methods

IsFull(int)

Gets whether the batch is full.

public bool IsFull(int maxSize)

Parameters

maxSize int

Returns

bool