O'Reilly logo

RabbitMQ Cookbook by Sigismondo Boschi, Gabriele Santomaggio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Filtering and forwarding messages

In this recipe we are going to implement a selective message forwarding. We will let the shovel plugin forward the subsets of messages to different destinations. A possible use case of this example is a company with three different sites having the following responsibilities:

  • One that takes book orders
  • One that needs only the orders with london as the routing key
  • One that needs only the orders with rome as the routing key

The aim is to forward messages selectively by adding or removing shovels without touching the source broker as follows:

Filtering and forwarding messages

Getting ready

You need three brokers; we will name them rabbitmq@rabbitmqc1,

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required