Class MessageBatch
- Namespace
- DotCompute.Abstractions.Messaging
- Assembly
- DotCompute.Abstractions.dll
Represents a batch of messages ready for transmission.
public sealed class MessageBatch : IDisposable
- Inheritance
-
MessageBatch
- Implements
- Inherited Members
- Extension Methods
Constructors
MessageBatch(Guid, int, long, DateTimeOffset, DateTimeOffset, ReadOnlyMemory<byte>, IReadOnlyList<BatchedMessageInfo>, bool)
Creates a new message batch.
public MessageBatch(Guid batchId, int messageCount, long payloadSize, DateTimeOffset createdAt, DateTimeOffset flushedAt, ReadOnlyMemory<byte> payload, IReadOnlyList<BatchedMessageInfo> messageInfos, bool isCompressed = false)
Parameters
batchIdGuidmessageCountintpayloadSizelongcreatedAtDateTimeOffsetflushedAtDateTimeOffsetpayloadReadOnlyMemory<byte>messageInfosIReadOnlyList<BatchedMessageInfo>isCompressedbool
Properties
BatchId
Gets the unique identifier for this batch.
public Guid BatchId { get; }
Property Value
CreatedAt
Gets when the batch was created.
public DateTimeOffset CreatedAt { get; }
Property Value
FlushedAt
Gets when the batch was flushed.
public DateTimeOffset FlushedAt { get; }
Property Value
IsCompressed
Gets whether the payload is compressed.
public bool IsCompressed { get; }
Property Value
MessageCount
Gets the number of messages in the batch.
public int MessageCount { get; }
Property Value
MessageInfos
Gets the message type information for deserializing the batch.
public IReadOnlyList<BatchedMessageInfo> MessageInfos { get; }
Property Value
Payload
Gets the serialized batch payload.
public ReadOnlyMemory<byte> Payload { get; }
Property Value
PayloadSize
Gets the total payload size in bytes.
public long PayloadSize { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()