Book Image

Microsoft Azure Development Cookbook Second Edition

Book Image

Microsoft Azure Development Cookbook Second Edition

Overview of this book

Table of Contents (15 chapters)
Microsoft Azure Development Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Receiving messages with Service Bus queues


Service Bus is the fully-featured service for companies that are looking for a robust and scalable solution of messaging and integrating disconnected and heterogeneous systems. In the Managing Azure Service Bus queues recipe, we saw how to create a queue in a specific namespace and we saw how to add messages into it in the Adding Messages to a Service Bus queue recipe.

The most important entity that represents a message travelling in the queue is the BrokeredMessage class. Each message on the queue is represented by this object model that wraps a large set of message-specific properties such as user-defined properties and, of course, content. The body content could be everything that is compatible with DataContractSerializer, while Properties is a key-value collection of user-defined properties; it is probably the most interesting feature of the entire Service Bus. In fact, a BrokeredMessage property could be used for the following purposes:

  • To deliver...