SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)
RabbitMQ is a message broker - an application that allows communication between applications by way of a message queuing system. In this talk, we’ll set up an RabbitMQ instance, take an intermediate-level look into the technical features it provides and also how you can apply RabbitMQ in your in applications to scale them efficiently.
RabbitMQ is a message broker - an application that allows communication between applications by way of a message queuing system. In this talk, we’ll set up an RabbitMQ instance, take an intermediate-level look into the technical features it provides and also how you can apply RabbitMQ in your in applications to scale them efficiently.
33.
Objective: Direct Exchange
test_direct
BK = apple
BK = banana, apple
Consumer
Consumer
Producer
3
Message Routing Keys
1 = orange
2 = banana
3 = apple
2 3
BK = orange, banana,
apple
Consumer1 2 3
40.
Fetch message
Logging Sequence
ApplicationBrowser Log Server
HTTP request
JSON via AMQP
Error!
HTTP response
RabbitMQ
41.
Flexibility!
● Temporary Queues
○ e.g. inspect “debug” messages
42.
Flexibility!
● Temporary Queues
● Queues to log to DB
43.
Flexibility!
● Temporary Queues
● Queues to log to DB
● Queues to email “alert/emergency”
44.
Flexibility!
● Temporary Queues
● Queues to log to DB
● Queues to email “alert/emergency”
● Get creative with routing keys
○ RK = app.api.error … BK = #.api.error
○ RK = app.form.debug … BK = #.debug