BrokeredMessage Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the unit of communication between Service Bus clients.
public sealed class BrokeredMessage : IDisposable, System.Xml.Serialization.IXmlSerializable
type BrokeredMessage = class
interface IXmlSerializable
interface IDisposable
Public NotInheritable Class BrokeredMessage
Implements IDisposable, IXmlSerializable
- Inheritance
-
BrokeredMessage
- Implements
Constructors
BrokeredMessage() |
Initializes a new instance of the BrokeredMessage class. |
BrokeredMessage(Object, XmlObjectSerializer) |
Constructor that creates a BrokeredMessage from a given object using the provided XmlObjectSerializer |
BrokeredMessage(Object) |
Initializes a new instance of the BrokeredMessage class from a given object by using DataContractSerializer with a binary XmlDictionaryWriter. |
BrokeredMessage(Stream, Boolean) |
Initializes a new instance of the BrokeredMessage class using the supplied stream as its body. |
BrokeredMessage(Stream) |
Initializes a new instance of the BrokeredMessage class. |
Properties
ContentType |
Gets or sets the type of the content. |
CorrelationId |
Gets or sets the identifier of the correlation. |
DeadLetterSource | |
DeliveryCount |
Gets the number of deliveries. |
EnqueuedSequenceNumber |
Gets or sets the enqueued sequence number of the message. |
EnqueuedTimeUtc |
Gets the date and time of the sent time in UTC. |
ExpiresAtUtc |
Gets the date and time in UTC at which the message is set to expire. |
ForcePersistence |
Gets or sets a value that indicates whether the message is to be persisted to the database immediately, instead of being held in memory for a short time. This property is ignored if the message is sent to a non-express queue or topic. |
IsBodyConsumed |
Specifies whether the message has been consumed. |
Label |
Gets or sets the application specific label. |
LockedUntilUtc |
Gets the date and time in UTC until which the message will be locked in the queue/subscription. |
LockToken |
Gets the lock token assigned by Service Bus to this message. |
MessageId |
Gets or sets the identifier of the message. This is a user-defined value that Service Bus can use to identify duplicate messages, if enabled. |
PartitionKey |
Gets or sets a partition key for sending a transactional message to a queue or topic that is not session-aware. |
Properties |
Gets the application specific message properties. |
ReplyTo |
Gets or sets the address of the queue to reply to. |
ReplyToSessionId |
Gets or sets the session identifier to reply to. |
ScheduledEnqueueTimeUtc |
Gets or sets the date and time in UTC at which the message will be enqueued. This property returns the time in UTC; when setting the property, the supplied DateTime value must also be in UTC. |
SequenceNumber |
Gets the unique number assigned to a message by the Service Bus. |
SessionId |
Gets or sets the identifier of the session. |
Size |
Gets the size of the message in bytes. |
State |
Gets or sets the state of the message. |
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.TimeToLive is the maximum lifetime that a message can receive, but its value cannot exceed the entity specified the DefaultMessageTimeToLive value on the destination queue or subscription. If a lower TimeToLive value is specified, it will be applied to the individual message. However, a larger value specified on the message will be overridden by the entity’s DefaultMessageTimeToLive value. |
To |
Gets or sets the send to address. |
ViaPartitionKey |
Gets or sets a partition key value when a transaction is to be used to send messages via a transfer queue. |
Methods
Abandon() |
Abandons the lock on a peek-locked message. |
Abandon(IDictionary<String,Object>) |
Abandons the lock on a peek-locked message. |
AbandonAsync() |
Asynchronously abandons the lock on a peek-locked message. |
AbandonAsync(IDictionary<String,Object>) |
Asynchronously abandons the lock on a peek-locked message. |
Clone() |
Clones a message, so that it is possible to send a clone of a message as a new message. |
Complete() |
Completes the receive operation of a message and indicates that the message should be marked as processed and deleted. |
CompleteAsync() |
Asynchronously completes the receive operation of a message and indicates that the message should be marked as processed and deleted. |
DeadLetter() |
Moves the message to the dead letter queue. |
DeadLetter(IDictionary<String,Object>) |
Moves the message to the dead letter queue. |
DeadLetter(String, String) |
Moves the message to the dead letter queue. |
DeadLetterAsync() |
Asynchronously moves the message to the dead letter queue. |
DeadLetterAsync(IDictionary<String,Object>) |
Asynchronously moves the message to the dead letter queue. |
DeadLetterAsync(String, String) |
Asynchronously moves the message to the dead letter queue. |
Defer() |
Indicates that the receiver wants to defer the processing for this message. |
Defer(IDictionary<String,Object>) |
Indicates that the receiver wants to defer the processing for this message. |
DeferAsync() |
Asynchronously indicates that the receiver wants to defer the processing for this message. |
DeferAsync(IDictionary<String,Object>) |
Asynchronously indicates that the receiver wants to defer the processing for this message. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
GetBody<T>() |
Deserializes the brokered message body into an object of the specified type by using the DataContractSerializer with a binary XmlDictionaryReader. |
GetBody<T>(XmlObjectSerializer) |
Deserializes the BrokeredMessage body into an object of the specified type using DataContractSerializer with a Binary XmlObjectSerializer. |
RenewLock() |
Renews the lock on a message. |
RenewLockAsync() |
Asynchronously renews the lock on a message. |
ToString() |
Returns a string that represents the current message. |
Explicit Interface Implementations
IXmlSerializable.GetSchema() |
This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class. |
IXmlSerializable.ReadXml(XmlReader) |
Generates an object from its XML representation. This method is reserved for internal use and should not be used directly or indirectly (for example, using a serializer or a formatter). |
IXmlSerializable.WriteXml(XmlWriter) |
Converts an object into its XML representation. This method is reserved for internal use and should not be used directly or indirectly (e.g. using a serializer or a formatter). |