AMQP Consumers and Topology Practice

AMQP Consumers and Topology Practice

animation
amqp
protocols
messaging

Consumer topology checkpoint

TipBroker Bex, Messaging and broker domain expertCheckpoint: Consumer Topology

You now know:

  • Competing consumers share one queue so each message is handled once by one worker.
  • Fan-out gives each consumer its own queue, so every consumer sees every event and broker memory grows with copies.
  • Prefetch matters most for competing consumers because high prefetch lets one worker hold messages that other workers could process.

Routing questions

Knowledge Check

Question: What does an exchange do in AMQP?

Routes messages to queues based on rules

Question: What’s the difference between * and # wildcards?

* matches exactly one word; # matches zero or more words

Question: When would you use fanout exchange?

When every subscriber needs to receive every message (like broadcast)

Pika setup practice

Factory routing checkpoint

TipBroker Bex, Messaging and broker domain expertCheckpoint: Factory Alert Routing

You now know:

  • A routing key hierarchy such as alert.{severity}.{line}.{machine} lets teams subscribe by severity, line, or catch-all history without producer rewrites.
  • The worked example reduces broadcast delivery waste because broker-side pattern matching sends critical, warning, and info alerts only to the queues that need them.
  • Alternate exchanges and dead-letter queues are the safety net when a message has no matching route.

Label the diagram

Label the Diagram

Note

Order the steps

Order the Steps

Note

Match the concepts

Match the Concepts

Note

Technical boundaries. The Pika setup uses localhost, one topic exchange, and one routing key. It publishes a message but does not show queues, bindings, or consumers receiving and settling deliveries.

Back to the chapter