Understanding the exchange-to-exchange extension

By default, AMQP supports exchange-to-queue but it doesn't support exchange-to-exchange bindings. In this example, we show how to use the RabbitMQ exchange-to-exchange extension.

In this example, we will merge the messages coming from two different exchanges to a third one. You can find the source code in Chapter02/Recipe08/Java/src/rmqexample.

Getting ready

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, and run the producers from the Broadcasting messages and Working with message routing using topic exchanges recipes.

How to do it...

Complete the following steps to use the RabbitMQ exchange-to-exchange ...

Get RabbitMQ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.