Skip Navigation LinksAzure Developers Guide > Azure Service Bus > Brokered Messaging > Messages

Training Courses

All course material is in English, and courses are delivered in English. Feel free to contact me for further information.


All messages used in the Service Bus brokered messaging services are instances of the BrokeredMessage class. Messages are made up of a header and a body. The message header contains properties and contextual information about the message. The message body contains the payload or data of the message.


Message Header

The message header contains a number of fixed properties that are used by the service bus messaging entities and by sending and receiving applications to handle the processing of messages. Some of these properties are used by the messaging entities, others are application specific.

The header also contains a string, object dictionary, named Properties, which can be used to store a number of name-value pairs that can be used for routing messages between topics and subscriptions and also by sending and receiving applications for application specific logic.


The maximum allowed size for a message header is 64 kb.

Be aware that “message properties” could possibly refer to the fixed properties of the message, such as MessageId, and Label, and also to the name-value pairs in the Properties dictionary. I will endeavor to use “message properties collection” when referring to the name-value properties collection.

Message Body

The message body contains the serialized data that is transmitted in the message. This is typically the serialized state of an object, or a data stream. In some cases the message body can be empty.

Message Immutability

BizTalk developers are familiar with the concept of immutable messages; the same goes in Service Bus brokered messaging. Once an instance of the BrokeredMessage class has been created it is not possible to set or modify the message body content.

Message Size Limitations

The Service Bus brokered messaging services have a limit on the size of message that can be placed on a queue or a topic. The current limit on the message size is 256 KB, which includes the message body and header. There is, however, no limit in the size of message that can be created using the BrokeredMessage class. The handling of large messages in the Service Bus brokered messaging services will be covered later in this chapter.

Speaking Engagements