Class MetadataTransportExtensions
Extension methods for accessing transport and delivery metadata from Properties.
public static class MetadataTransportExtensions
- Inheritance
-
MetadataTransportExtensions
- Inherited Members
Methods
GetDeadLetterErrorDescription(IMessageMetadata)
Gets the error description for dead-lettered messages.
public static string? GetDeadLetterErrorDescription(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- string
The dead letter error description, or null if not set.
GetDeadLetterQueue(IMessageMetadata)
Gets the name of the dead-letter queue for this message.
public static string? GetDeadLetterQueue(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- string
The dead letter queue name, or null if not set.
GetDeadLetterReason(IMessageMetadata)
Gets the reason why the message was dead-lettered.
public static string? GetDeadLetterReason(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- string
The dead letter reason, or null if not set.
GetDeliveryCount(IMessageMetadata)
Gets the number of times this message has been delivered.
public static int GetDeliveryCount(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- int
The delivery count, or 0 if not set.
GetDuplicateDetectionWindow(IMessageMetadata)
Gets the window for duplicate detection.
public static TimeSpan? GetDuplicateDetectionWindow(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- TimeSpan?
The duplicate detection window, or null if not set.
GetDurable(IMessageMetadata)
Gets a value indicating whether this message requires durable storage.
public static bool? GetDurable(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- bool?
The durable flag, or null if not set.
GetLastDeliveryError(IMessageMetadata)
Gets the reason for the last delivery failure.
public static string? GetLastDeliveryError(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- string
The last delivery error, or null if not set.
GetMaxDeliveryCount(IMessageMetadata)
Gets the maximum number of delivery attempts allowed.
public static int? GetMaxDeliveryCount(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- int?
The maximum delivery count, or null if not set.
GetPriority(IMessageMetadata)
Gets the priority level of this message.
public static int? GetPriority(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- int?
The priority level, or null if not set.
GetRequiresDuplicateDetection(IMessageMetadata)
Gets a value indicating whether duplicate detection should be applied.
public static bool? GetRequiresDuplicateDetection(this IMessageMetadata metadata)
Parameters
metadataIMessageMetadataThe message metadata.
Returns
- bool?
The duplicate detection flag, or null if not set.