AMQP · Study deck

AMQP Core Architecture: Brokers and Routing

AMQP is easiest to understand as a sorting office for messages.

Broker Bex is your guide for this deck.

archcorecomponents
Broker Bex, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Describe AMQP Architecture: Explain the roles of producers, brokers, exchanges, queues, and consumers in the AMQP messaging model
  • Configure Exchange Types: Set up direct, fanout, topic, and headers exchanges for different message routing patterns
  • Implement Message Routing: Design binding rules that route messages from exchanges to queues based on routing keys
  • Demonstrate Channel Multiplexing: Explain how multiple logical channels share a single TCP connection and calculate the resource savings of multiplexing over separate connections
iotclass.org

Major section

In 60 Seconds

A protocol is a shared set of rules for exchanging data.

  • AMQP means Advanced Message Queuing Protocol.
  • A broker is the service that accepts and routes messages.
  • Telemetry means measurements and status sent from a remote device for review.
  • MQTT means Message Queuing Telemetry Transport.
iotclass.org

Major section

In 60 Seconds (continued)

TCP means a connected byte stream that tracks order and loss.

  • A live connection does not prove correct routing.
  • This runway does not select one message system for every workload.
  • AMQP's architecture centers on the broker, which receives messages from producers, routes them through exchanges (direct, fanout, topic, or headers) to bound queues, and delivers them to consumers.
iotclass.org

Major section

For Beginners: AMQP Architecture

Direct application-to-application connections would be a nightmare - each app would need code to talk to dozens of others.

  • AMQP (Advanced Message Queuing Protocol) solves this with a message broker - a central post office that routes messages.
  • Producers (publishers) send messages to the broker.
  • Queues store messages until consumers are ready.
iotclass.org

Major section

The Message Sorting Office

the battery nodded approvingly. "And since Sammy only talks to one exchange instead of three different systems, he uses way less power.

  • the microcontroller grinned. "You don't have to figure that out yourself, Sammy.
  • That's what the AMQP broker does!
  • Nobody loses any data!".
iotclass.org

Major section

AMQP 0-9-1 Model: Exchanges, Queues, and Bindings

With the broker roles in place, the next question is how AMQP 0-9-1 represents routing rules inside that broker.

  • Exchanges match; bindings express the match rules; queues store independently consumable copies.
  • That division explains why broker acceptance, successful routing, durable storage, and consumer completion require different checks.

Key terms

Exchanges
Exchanges are the routing layer of AMQP.
Queues
Queues are message buffers that store messages until consumed.
Bindings
Bindings are rules that connect exchanges to queues, defining the routing logic.
AMQP 0-9-1 model with exchanges routing messages to multiple queues via bindings
AMQP 0-9-1 model with exchanges routing messages to multiple queues via bindings
iotclass.org

Deck summary

Key takeaways

A protocol is a shared set of rules for exchanging data.

  • TCP means a connected byte stream that tracks order and loss.
  • Direct application-to-application connections would be a nightmare - each app would need code to talk to dozens of others.
  • the battery nodded approvingly. "And since Sammy only talks to one exchange instead of three different systems, he uses way less power.
  • With the broker roles in place, the next question is how AMQP 0-9-1 represents routing rules inside that broker.
iotclass.org

Retrieval practice

Recall check

Broker Bex says: answer from memory, then check your reasoning.

Q1A factory producer publishes a temperature message, but the intended queue receives no copy. Which routing detail should the team inspect?

AThe exchange binding and routing key
BThe consumer processing acknowledgement
CThe queue message durability setting
DThe message body content type
Show answer

Answer: A Bindings determine which queues match the published routing key.

Q2A broker client needs concurrent message streams with less connection setup overhead. Which arrangement fits the chapter?

AA separate TCP connection for each stream
BOne queue replacing the client channels
CA routing key replacing the TCP connection
DSeveral channels sharing one TCP connection
Show answer

Answer: D Lightweight channels let concurrent streams share a TCP connection.

iotclass.org

Print reference

Answers

Answer key.

  1. A · Bindings determine which queues match the published routing key.
  2. D · Lightweight channels let concurrent streams share a TCP connection.
iotclass.org