Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Objectives

This sample demonstrates how persistent queues can be created and used in Message Broker using the RabbitMQ .NET/C# client. It first introduces a sample .NET client named "QueuePublisher", which is used to publish messages to a known, created queue in WSO2 Message Broker, and then introduces a sample .NET client named "QueueConsumer" to receive messages and print message content to the console.

Prerequisites

To run this code sample, you must download and add the RabbitMQ.Client.dll file as a reference in your .NET project. You can download the file from http://www.rabbitmq.com/dotnet.html or from the WSO2 repository.

Running the sample

Before running the QueuePublisher class,we must register at least one  QueueConsumer  binding before sending messages to the queue by doing one of the following:

...