Requirements

This sample code requires the following additional Visual Studio project reference: Microsoft.ServiceBus. The Microsoft.ServiceBus.dll assembly can be found in the Microsoft Azure SDK .

Demonstrates

This sample shows how to write a Microsoft Azure Service Bus listener application for a queue (message buffer) endpoint contract.

The listener waits for a Microsoft Dynamics CRM message to be posted to the service bus and available in the endpoint queue. When a message is available in the queue the listener reads the message, prints the Microsoft Dynamics CRM execution context contained in the message to the console, and deletes the message from the queue.

Message buffers are deprecated and support for them will be removed in a future Microsoft Dynamics CRM SDK release. Persistent queues are supported and are the preferred queue contract to use. For a sample that uses persistent queues, see Sample: Persistent queue listener.