Brokered message Properties

When sending a message, you can specify the following message properties. If a single message is sent or received, then these properties are contained in the BrokerProperties HTTP header in a JSON-encoded format. If a batch of messages is sent, these properties are part of the JSON-encoded HTTP body. For more information, see Send Message and Send Message Batch.

The following table lists the Microsoft.ServiceBus.Messaging.BrokeredMessage properties. The properties can appear in any order. If a property is not specified, Service Bus uses the default value for that property. Broker properties other than the ones listed are ignored. The accepted properties are independent of the value of the specified api-version. The api-version specifier is not required in the HTTP request.

If the SessionId and PartitionKey properties are both set, they must be set to the same value.

Property Name Default Property Description
CorrelationId (empty) CorrelationId
ForcePersistence false ForcePersistence
Label (empty) Label
MessageId (empty) MessageId
PartitionKey (empty) PartitionKey
ReplyTo (empty) ReplyTo
ReplyToSessionId (empty) ReplyToSessionId
ScheduledEnqueueTimeUtc (empty) ScheduledEnqueueTimeUtc
SessionId (empty) SessionId
TimeToLive (empty) TimeToLive
To (empty) To
ViaPartitionKey (empty) ViaPartitionKey

In addition to these properties, you can specify custom properties. If a single message is sent or received, each custom property is placed in its own HTTP header. If a batch of messages is sent, custom properties are part of the JSON-encoded HTTP body. For more information, see Send Message and Send Message Batch.