News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brandon Savage:
Consuming RabbitMQ messages with PHP
May 31, 2013 @ 09:15:47

Brandon Savage continues his look at using RabbitMQ and PHP together to queue up requests today in this latest post. In this new part of the series, he focuses on the last piece of the puzzle - consuming the requests in the queue. (Parts one and two)

Once you've created a RabbitMQ producer, it's fairly easy to create a consumer. In fact, the only difference is in exactly what commands you're using. The connection, envelope, channel and queue declarations are the same. While in RabbitMQ you publish to the exchange, you actually do consume a specific queue. As a result, the commands for consuming are part of the AMQPQueue class.

He shows you how to set up the code to sit in the background and wait for a queue request and how to fetch them in a non-blocking way. He finishes off the post with a look at handling success and error conditions (based on the status of message consumption, not the result of the processing).

0 comments voice your opinion now!
rabbitmq tutorial consume amqp library success failure nonblocking background

Link: http://www.brandonsavage.net/consuming-rabbitmq-messages-with-php

blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Creating and Manipulating PDFs with PHP and FPDF

WebReference.com: The Building Blocks: Data Types, Literals, Variables, and Constants - Part 2

Jeremy Cook's Blog: Installing Imagick under Apache on Windows

Matthew Weier O'Phinney's Blog: Getting started writing ZF2 modules

Matthew Weier O'Phinney's Blog: Rendering Zend_Form decorators individually


Community Events





Don't see your event here?
Let us know!


series code conference introduction community interview tips bugfix api symfony framework podcast deployment list language zendserver voicesoftheelephpant release threedevsandamaybe laravel

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework