-
Book Overview & Buying
-
Table Of Contents
RabbitMQ Cookbook
By :
In this example, we show how to use a single publish to send a message with multiple routing keys. The standard AMQP doesn't provide this feature but luckily, RabbitMQ does so using a message properties header. This extension is called sender-selected distribution.
The behavior of the extension is similar to e-mail logics. It uses Carbon Copy (CC) and
Blind Carbon Copy (BCC). This is the reason you will find CC and BCC consumers in the source code, located in Chapter02/Recipe09/Java/src/rmqexample:
Producer.java
Consumer.java
StatsConsumer.java
CCStatsConsumer.java
BCCStatsConsumer.java
To use this recipe, we need to set up the Java development environment as indicated in the Introduction section of Chapter 1, Working with AMQP.
Complete the following steps to use a single publish to send a message with multiple routing keys:
Create or declare the exchange using the following code:
channel.exchangeDeclare(exchange, "direct...
Change the font size
Change margin width
Change background colour