AMQP · Study deck
AMQP Operations: Capacity Tools and Diagnostics
In production, AMQP carries work through a broker.
Broker Bex is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Explain: If the same channel keeps a window of 1,000 outstanding confirms, the theoretical pipe becomes roughly 1000 / 0.025 = 40,000 msg/s before broker, disk, and network limits.
- Explain: It replicates contents with Raft across an odd number of nodes and keeps working while a majority is available; a publisher confirm means a quorum has accepted the message.
- Explain: Production adds two harder requirements: the queue must survive a broker node failing, and the publisher must sustain thousands of messages per second without blocking on each confirm.
- Use AMQP calculators to test load and capacity.
Major section
Visual: AMQP Routing Topology
The view shows where routing flexibility lives and where backlog can accumulate.
- It connects topology design to binding tests, queue monitoring, and unroutable-message policy.
- This diagram shows how AMQP’s exchange-binding-queue model supports routing patterns distinct from MQTT topic subscriptions.
Major section
Visual: AMQP Protocol Overview
This placement explains why availability, confirmation, persistence, acknowledgment, and monitoring must cover separate parts of the same path.
- AMQP's broker-mediated architecture provides the reliable, transactional messaging capabilities required for enterprise IoT backend integration scenarios.
Major section
Availability and Confirms
A durable disk file is not enough if no live member can keep serving the message.
- A protocol is an agreed set of rules for an exchange: Advanced Message Queuing Protocol, or AMQP, is a protocol for exchanging messages.
- A broker is the service that receives, routes, and holds those messages.
- Practitioner sets up the queue and connection plan.
Major section
Availability and Confirms (continued)
For a critical queue, name how many members hold it, which loss it can survive, and what the sender learns about each accepted message.
- Delay confirmations, refuse one message, and return one that has no valid route.
- Track each message until it is confirmed, retried, rejected, or left unknown.
- Everything so far makes a single broker correct.
Major section
Availability and Confirms (continued)
This small test does not prove every high-load case.
- Under the Hood tracks confirmation state at speed and explains the remaining loss windows.
- AMQP Production Operations teaches durable declarations, client-library implementations, dead-letter queues, monitoring, and capacity calculators.
- The two answers are replicated queues and asynchronous publisher confirms.
- Connection hygiene has the same measurable shape.
Major section
Availability and Confirms (continued)
Production adds two harder requirements: the queue must survive a broker node failing, and the publisher must sustain thousands of messages per second without blocking on each confirm.
- A durable queue on one node is still a single point of failure; a synchronous "publish, wait for confirm, repeat" loop is safe but slow.
- At the alert queue, 5% of 1,200 messages/s is 60 messages/s of ingress.
- The throughput difference is large.
Major section
Availability and Confirms (continued)
The three factories create 1,200 messages/s of ingress; exchange bindings determine how much of that rate reaches each queue, and every queue holds its own backlog.
- It replicates contents with Raft across an odd number of nodes and keeps working while a majority is available; a publisher confirm means a quorum has accepted the message.
- If each gateway opens a connection per message at 2 msg/s, the broker sees 1,000 TCP handshakes per second before it processes payloads.
- With a quorum queue and successful confirms, this protects broker acceptance while allowing high throughput; the publisher need not block on each ack.
Major section
Availability and Confirms (continued)
Prefetch is applied per consumer in RabbitMQ; a sustained near-limit count can show saturated workers.
- So a robust publisher keeps a map of unconfirmed tags, removes them as acks arrive, resends on nack or unknown outcome with duplicate-safe IDs, and treats a returned message as a routing failure.
- If the same channel keeps a window of 1,000 outstanding confirms, the theoretical pipe becomes roughly 1000 / 0.025 = 40,000 msg/s before broker, disk, and network limits.
- Confirms protect accepted writes, queues reveal backlog, ACKs reveal consumer progress, and DLQs reveal work the normal path could not process.
Deck summary
Key takeaways
The view shows where routing flexibility lives and where backlog can accumulate.
- This placement explains why availability, confirmation, persistence, acknowledgment, and monitoring must cover separate parts of the same path.
- A durable disk file is not enough if no live member can keep serving the message.
- For a critical queue, name how many members hold it, which loss it can survive, and what the sender learns about each accepted message.
- This small test does not prove every high-load case.
Retrieval practice
Recall check 1 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q1The publisher reports success but a service queue stays empty. Which view should an operator inspect first?
Show answer
Answer: C The route can fail between accepted publish and queue copy.
Q2What routes and replicates queued work so a broker node failure need not lose accepted messages?
Show answer
Answer: A The broker cluster applies routing, queues durable work, and replicates state so one node failure need not lose accepted messages.
Retrieval practice
Recall check 2 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q3Complete the production AMQP consumer with prefetch control and error handling:
Show answer
Answer: A basic_nack with requeue=False sends failed messages to the dead letter queue.
Retrieval practice
Recall check 3 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q4Per this chapter's Overview section, which four thresholds does it say should be defined before a RabbitMQ release, to make the broker "observable as a production service"?
Show answer
Answer: C see answers page
Retrieval practice
Recall check 4 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q5Per this chapter's connection-hygiene worked example, what happens if 500 edge gateways each open a new connection per message instead of reusing a pooled publishing connection, at 2 messages/second per gateway?
Show answer
Answer: A see answers page
Retrieval practice
Recall check 5 of 5

Broker Bex says: answer from memory, then check your reasoning.
Q6A production publisher needs broker-node fault tolerance, high throughput, and visibility when a publish is unroutable. Which listed publisher-side combination best supports those goals?
Show answer
Answer: C For the stated publisher-side goals, combine a replicated quorum queue with tracked asynchronous confirms and mandatory-return handling.
Print reference
Answers 1 of 3
Answer key.
- C · The route can fail between accepted publish and queue copy.
- A · The broker cluster applies routing, queues durable work, and replicates state so one node failure need not lose accepted messages.
- A · basic_nack with requeue=False sends failed messages to the dead letter queue.
Print reference
Answers 2 of 3
Answer key.
- C · The chapter's production observability rule is to define four thresholds before release -- max queue depth, max age of the oldest message, min active consumers, and max unconfirmed publishes -- so a queue that is 'already failing the product promise' (like a 90-second-old message against a 30-second SLA) is caught by an alert, not discovered after data loss.
Print reference
Answers 3 of 3
Answer key.
- A · The chapter's connection-hygiene example: 500 gateways publishing at 2 msg/s each, if each opens a fresh connection per message, produces 1,000 TCP handshakes/second (500 x 2) before any payload is processed -- versus hundreds of stable, reused sockets if connections are pooled and channels reused per stream.
- C · For the stated publisher-side goals, combine a replicated quorum queue with tracked asynchronous confirms and mandatory-return handling.