Class BrokeredMessageProperty
- Namespace
- Microsoft.ServiceBus.Messaging
- Assembly
- Microsoft.ServiceBus.dll
Represents the property bag for a BrokeredMessage.
public sealed class BrokeredMessageProperty : IMessageProperty
- Inheritance
-
BrokeredMessageProperty
- Implements
-
IMessageProperty
- Inherited Members
Constructors
BrokeredMessageProperty()
Initializes a new instance of the BrokeredMessageProperty class.
public BrokeredMessageProperty()
Fields
Name
The name used for applying the property bag to a System.ServiceModel.Channels.Message when sending a message.
public static readonly string Name
Field Value
Properties
ContentType
Gets or sets the type of the content.
public string ContentType { get; set; }
Property Value
- string
The type of the content of the message body. This is a content type identifier utilized by the sender and receiver for application specific logic.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
CorrelationId
Gets or sets the identifier of the correlation.
public string CorrelationId { get; set; }
Property Value
- string
The correlation identifier.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
DeliveryCount
Gets the number of deliveries that have been made to deliver this message.
public int DeliveryCount { get; }
Property Value
- int
The number of deliveries that have been made to deliver this message.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
- InvalidOperationException
If the message has not been delivered by ServiceBus.
EnqueuedTimeUtc
Gets or sets the date and time of the sent time in UTC.
public DateTime EnqueuedTimeUtc { get; }
Property Value
- DateTime
The enqueue time in UTC. This value represents the actual time of enqueuing the message.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
ExpiresAtUtc
Gets the date and time in UTC at which the message is set to expire.
public DateTime ExpiresAtUtc { get; }
Property Value
- DateTime
The message expiration time in UTC.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
ForcePersistence
Gets or sets whether to force persistence on this property.
public bool ForcePersistence { get; set; }
Property Value
- bool
true to force persistence on this property; otherwise, false.
Label
Gets or sets the application specific label.
public string Label { get; set; }
Property Value
- string
The application specific label.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
LockToken
Gets the lock token assigned by Service Bus to the message.
public Guid LockToken { get; }
Property Value
- Guid
The lock token assigned by Service Bus to the message.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
- InvalidOperationException
If the message was not received from the ServiceBus.
LockedUntilUtc
Gets the date and time in UTC until which the message will be locked in the queue/subscription.
public DateTime LockedUntilUtc { get; }
Property Value
- DateTime
The date and time until which the message will be locked in the queue/subscription.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
- InvalidOperationException
If the message was not received from the ServiceBus.
Message
Gets the brokered message.
public BrokeredMessage Message { get; }
Property Value
- BrokeredMessage
The brokered message object.
MessageId
Gets or sets the identifier of the message.
public string MessageId { get; set; }
Property Value
- string
The message identifier.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
- ArgumentException
If message identifier is null or exceeds 128 characters in length.
PartitionKey
Gets or sets a partition key for sending a transactional message to a queue or topic that is not session-aware.
public string PartitionKey { get; set; }
Property Value
Properties
Gets the properties of the brokered message.
public IDictionary<string, object> Properties { get; }
Property Value
- IDictionary<string, object>
The properties of the brokered message.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
ReplyTo
Gets or sets the address of the queue to reply to.
public string ReplyTo { get; set; }
Property Value
- string
The reply to queue address.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
ReplyToSessionId
Gets or sets the session identifier to reply to.
public string ReplyToSessionId { get; set; }
Property Value
- string
The session identifier to reply to.
ScheduledEnqueueTimeUtc
Gets or sets the date and time in UTC at which the message will be enqueued.
public DateTime ScheduledEnqueueTimeUtc { get; set; }
Property Value
- DateTime
The scheduled enqueue time in UTC. This value is for delayed message sending. It is utilized to delay messages sending to a specific time in the future.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
- ArgumentOutOfRangeException
If the passed in value is DateTime.MaxValue.
SequenceNumber
Gets the unique number assigned to a message by the Service Bus.
public long SequenceNumber { get; }
Property Value
- long
The unique number assigned to a message by the Service Bus.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
- InvalidOperationException
If the message was not received from the message server.
SessionId
Gets or sets the identifier of the session.
public string SessionId { get; set; }
Property Value
- string
The identifier of the session.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
TimeToLive
Gets or sets the message’s time to live value. This is the duration after which the message expires, starting from when the message is sent to the Service Bus.Messages older than their TimeToLive value will expire and no longer be retained in the message store. Subscribers will be unable to receive expired messages.
public TimeSpan TimeToLive { get; set; }
Property Value
- TimeSpan
The message’s time to live value.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
- ArgumentOutOfRangeException
If the passed in value is less than or equal to TimeSpan.Zero.
To
Gets or sets the send to address.
public string To { get; set; }
Property Value
- string
The address of the destination queue.
Exceptions
- ObjectDisposedException
If the message is in disposed state.
ViaPartitionKey
Gets or sets a partition key value when a transaction is to be used to send messages via a transfer queue.
public string ViaPartitionKey { get; set; }