Header-Based Content Routing

In Header-based content routing, the message is created by the producer. The producer puts some meta-information in the Header of the Message describing the Content of the Message. For example, let's assume the data is an image. We could then have the producer provide the following in the message header:

  • Width=1024
  • Height=768
  • Mode=bw
  • Photographer=Anuj Kumar

Now we can enable Content-Based routing by creating appropriate queues. Let's say we have one operation to perform on black-and-white images and another one on color images.

We can create two queues: one that receives messages with mode=bw and one that receives messages with mode=color. We can then have separate clients listening on these queues. The broker performs the routing, and there is nothing in the client that needs to be aware of the routing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.117.253