December 2013
Intermediate to advanced
288 pages
5h 48m
English
In this recipe we are learning how to send a message to an AMQP queue. We will be introduced to the building blocks of AMQP messaging: messages, queues, and exchanges.
You can find the source at Chapter01/Recipe02/src/rmqexample.
To use this recipe we need to set up the Java development environment as indicated in the Introduction section.
After connecting to the broker, as seen in the previous recipe, you can start sending messages performing the following steps:
queueDeclare() method on com.rabbitmq.client.Channel:String myQueue = "myFirstQueue"; channel.queueDeclare(myQueue, true, false, false, null);
String message = "My ...
Read now
Unlock full access