Table of Contents

Struct MessageBrokerQueueUnackedMessage

Namespace
LfrlAnvil.MessageBroker.Server
Assembly
LfrlAnvil.MessageBroker.Server.dll

Represents a snapshot of an unacked message stored by a MessageBrokerQueue.

public readonly struct MessageBrokerQueueUnackedMessage
Inherited Members

Properties

ExpiresAt

Moment in time when the ack for this message expires.

public Timestamp ExpiresAt { get; }

Property Value

Timestamp

Listener

MessageBrokerChannelListenerBinding that handles this message.

public MessageBrokerChannelListenerBinding Listener { get; }

Property Value

MessageBrokerChannelListenerBinding

MessageId

Unique id of this message.

public ulong MessageId { get; }

Property Value

ulong

Publisher

IMessageBrokerMessagePublisher that pushed this message.

public IMessageBrokerMessagePublisher Publisher { get; }

Property Value

IMessageBrokerMessagePublisher

Redelivery

Redelivery attempt of this message.

public int Redelivery { get; }

Property Value

int

Retry

Retry attempt of this message.

public int Retry { get; }

Property Value

int

StoreKey

Stream store key of this message.

public int StoreKey { get; }

Property Value

int

Methods

ToString()

Returns a string representation of this MessageBrokerQueueUnackedMessage instance.

[Pure]
public override string ToString()

Returns

string

String representation.

TryGetMessage(bool)

Attempts to retrieve a message from the stream store by the StoreKey.

[Pure]
public MessageBrokerStreamMessage? TryGetMessage(bool includeData = false)

Parameters

includeData bool

Specifies whether to include a copy of binary data. Equal to false by default.

Returns

MessageBrokerStreamMessage?

MessageBrokerStreamMessage instance associated with the StoreKey or null if such a message doesn't exist.