Chapter 6. Message patterns via exchange routing

 

This chapter covers

  • The four basic types of exchanges available through RabbitMQ, plus a plugin exchange
  • Which type of exchange is appropriate for your application architecture
  • How the use of exchange-to-exchange routing can add numerous routing options for your messages

Perhaps RabbitMQ’s greatest strength is the flexibility it offers for routing messages to different queues based upon routing information provided by the publisher. Whether it’s sending messages to a single queue, multiple queues, exchanges, or another external source provided by an exchange plugin, RabbitMQ’s routing engine is both extremely fast and highly flexible. Although your initial application may not need complex routing logic, starting with the right type of exchange can have a dramatic impact on your application architecture.

In this chapter, we’ll take a look at four basic types of exchanges and the types of architectures that can benefit from them:

  • Direct exchange
  • Fanout exchange
  • Topic exchange
  • Headers exchange

6.1. Simple message routing using the direct exchange

 
 
 
 

6.2. Broadcasting messages via the fanout exchange

 

6.3. Selectively routing messages with the topic exchange

 
 
 
 

6.4. Selective routing with the headers exchange

 
 

6.5. Exchange performance benchmarking

 
 

6.6. Going meta: exchange-to-exchange routing

 

6.7. Routing messages with the consistent-hashing exchange

 
 
 

6.8. Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage