AMQP · Study deck
AMQP Core Architecture: Exchange Types
AMQP is easiest to understand as a sorting office for messages.
Broker Bex is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Explain: Producers publish once (saving CPU and bandwidth), the broker handles routing (its core job), and each consumer receives only relevant messages.
- Explain: Channel multiplexing benefit:: Each of the 1,200 robots uses a single TCP connection with 4 channels (one per sensor type).
- Explain: The broker's pattern matching adds < 0.1 ms latency per message -- negligible for all three consumers' requirements.
- Explain: The broker routing eliminates 67% of unnecessary deliveries compared to fanout (which would send to all 3 queues).
Major section
Exchange Types
Different exchange types provide flexible routing patterns for various messaging scenarios.
- Direct exchanges route messages based on exact routing key matches.
- This reading connects deterministic routing with mandatory returns or alternate-exchange handling.
- Each bound queue receives its own copy, allowing independent consumers to progress at different rates.
- Routing key is dot-separated (e.g., "sensor.temperature.zone1").
Major section
Exchange Types (continued)
That broadcast behavior supports notifications and audit copies, while also making subscriber count part of capacity planning.
- Direct: Exact routing key match.
- Best for multi-attribute rules; supports x-match: all or x-match: any.
- AMQP exchange types at a glance: direct = exact match, fanout = broadcast, topic = wildcard patterns, headers = attribute matching.
Major section
Real-World Case Study: Industrial IoT with AMQP Exchange Routing
Three backend systems consume this data differently.
- Producers must publish each message 3 times to different exchanges.
- Network load: 4,800 x 3 = 14,400 publishes/second.
- Network load: 4,800 publishes/second (each message published once).
- Broker routes to 1-3 queues per message based on bindings.
Major section
Real-World Case Study: Industrial IoT with AMQP Exchange Routing (continued)
Each consumer processes 4,800 msg/s but discards 50-75% of them.
- Producers publish once (saving CPU and bandwidth), the broker handles routing (its core job), and each consumer receives only relevant messages.
- The broker's pattern matching adds < 0.1 ms latency per message -- negligible for all three consumers' requirements.
- Channel multiplexing benefit:: Each of the 1,200 robots uses a single TCP connection with 4 channels (one per sensor type).
Major section
Worked Example: Industrial IoT Message Routing with Topic Exchange
Result:: This single PUBLISH reaches 2 queues (Maintenance + Dashboard).
- The broker routing eliminates 67% of unnecessary deliveries compared to fanout (which would send to all 3 queues).
- 50 machines × 120 messages/hour = 6,000 publishes/hour.
- With fanout exchange: 6,000 publishes × 3 queues = 18,000 deliveries (112% overhead).
Deck summary
Key takeaways
Different exchange types provide flexible routing patterns for various messaging scenarios.
- That broadcast behavior supports notifications and audit copies, while also making subscriber count part of capacity planning.
- Three backend systems consume this data differently.
- Each consumer processes 4,800 msg/s but discards 50-75% of them.
- Result:: This single PUBLISH reaches 2 queues (Maintenance + Dashboard).
Retrieval practice
Recall check 1 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q1A routing key sensor.temperature.zone1 is published to a topic exchange. Which binding pattern will NOT match this routing key?
Show answer
Answer: C Topic exchange wildcards: * matches exactly one dot-separated word, and # matches zero or more.
Q2Place each app protocols concept where it lives so you can follow one AMQP message from sender through routing and storage to its receiver.
Show answer
Answer: A These boundaries keep publish message, route and hold, receive delivery distinct so you can follow one AMQP message from sender through routing and storage to its receiver.
Retrieval practice
Recall check 2 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q3Complete the AMQP exchange declaration and queue binding:
Show answer
Answer: A In AMQP, exchanges are declared with exchange_declare() specifying the type (direct, fanout, topic, headers).
Retrieval practice
Recall check 3 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q4An industrial monitoring system has 200 machines publishing diagnostic data with routing keys like machine.line1.id042.vibration and machine.line2.id103.temperature. The maintenance team wants to subscribe to ALL vibration readings from ALL machines on ALL production lines using a single queue binding. Which exchange type and binding pattern is correct?
Show answer
Answer: C
Retrieval practice
Recall check 4 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q5A smart building system publishes sensor messages with routing keys like sensor.temperature.floor3, sensor.humidity.floor1, and sensor.pressure.floor2. You need a single queue that receives ALL temperature readings from ALL floors, but nothing else. Which exchange type and binding pattern should you use?
Show answer
Answer: C
Retrieval practice
Recall check 5 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q6An IoT gateway uses AMQP channel multiplexing to handle data from 50 sensors simultaneously over a single TCP connection. One channel encounters an error due to a malformed message. What happens to the other 49 channels?
Show answer
Answer: A AMQP channel multiplexing provides isolation between channels on the same TCP connection.
Print reference
Answers
Answer key.
- C · Topic exchange wildcards: * matches exactly one dot-separated word, and # matches zero or more.
- A · These boundaries keep publish message, route and hold, receive delivery distinct so you can follow one AMQP message from sender through routing and storage to its receiver.
- A · In AMQP, exchanges are declared with exchange_declare() specifying the type (direct, fanout, topic, headers).
- C
- C
- A · AMQP channel multiplexing provides isolation between channels on the same TCP connection.