This document discusses RabbitMQ, an open source message broker. It describes how RabbitMQ allows applications to communicate asynchronously by sending and receiving messages through queues. It provides examples of different RabbitMQ exchange types including fanout, direct, and topic exchanges to illustrate how messages can be routed from producers to consumers. The examples are implemented in PHP using the AMQP library to demonstrate basic usage of RabbitMQ for message queuing and scaling applications.
28. Objective: Direct Exchange
test_direct
BK = banana, apple
BK = apple
Consumer
Consumer
Producer
BK = orange, banana,
apple
Consumer
29. Objective: Direct Exchange
test_direct
BK = banana, apple
BK = apple
Consumer
Consumer
Producer
MESSAGE
ROUTING KEY
= ORANGE
BK = orange, banana,
apple
Consumer
30. Objective: Direct Exchange
test_direct
BK = banana, apple
BK = apple
Consumer
Consumer
Producer
MESSAGE
ROUTING KEY
= BANANA
BK = orange, banana,
apple
Consumer
31. Objective: Direct Exchange
test_direct
BK = banana, apple
BK = apple
Consumer
Consumer
Producer
MESSAGE
ROUTING KEY
= APPLE
BK = orange, banana,
apple
Consumer