Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

of

What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 1 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 2 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 3 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 4 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 5 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 6 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 7 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 8 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 9 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 10 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 11 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 12 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 13 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 14 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 15 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 16 What RabbitMQ Can Do For You (Nomad PHP May 2014) Slide 17
Upcoming SlideShare
RabbitMQ - обмен сообщениями, который просто работает
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

What RabbitMQ Can Do For You (Nomad PHP May 2014)

Download to read offline


RabbitMQ is a message broker – an application that allows communication between applications by way of a message queuing system. In this talk, we look at some of the basic concepts of RabbitMQ and how it can help effectively scale your applications.

These slides are for the lightning talk I gave at Nomad PHP on 22nd May 2014.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

What RabbitMQ Can Do For You (Nomad PHP May 2014)

  1. 1. What RabbitMQ Can Do For You James Titcumb Nomad PHP Lightning Talk May 2014
  2. 2. Who is this guy? James Titcumb www.jamestitcumb.com www.protected.co.uk www.phphants.co.uk @asgrim
  3. 3. What is message queuing?
  4. 4. Separate applications
  5. 5. Low cost parallelisation
  6. 6. Basic Example Publisher queue Consumer Based on: http://www.rabbitmq.com/tutorials/tutorial-one-php.html
  7. 7. Exchanges Based on: http://www.rabbitmq.com/tutorials/tutorial-three-php.html queue1 Publisher Publisher Publisher Publisher Exchange queue2 Consumer Consumer Consumer
  8. 8. Exchanges: Direct Based on: http://www.rabbitmq.com/tutorials/tutorial-four-php.html fruit Exchange vegetable Fruit consumer Veg consumer Fruit consumer Publisher routing key: fruit routing key: vegetable
  9. 9. Exchanges: Topic Based on: http://www.rabbitmq.com/tutorials/tutorial-five-php.html *.fruit Exchange green.* Fruit consumer Green consumer Veg consumer Publisher routing key: green.fruit routing key: green.vegetable *.vegetable
  10. 10. Real World Uses ● Fast logging solution ● Sending emails ● Sending SMS ● Background processing (e.g. analysing data)
  11. 11. Using in PHP? https://github.com/videlalvaro/php-amqplib
  12. 12. composer.json { "require": { "videlalvaro/php-amqplib": "2.*" } }
  13. 13. Set up the channel use PhpAmqpLibConnectionAMQPConnection; $connection = new AMQPConnection( 'localhost', 5672, 'guest', 'guest', '/'); $channel = $connection->channel(); $channel->queue_declare('my_queue', /* params... */); $channel->exchange_declare( 'my_exchange', 'fanout', /* params... */); $channel->queue_bind('my_queue', 'my_exchange');
  14. 14. Basic Publishing Example use PhpAmqpLibMessageAMQPMessage; $content = 'Hello world'; $message = new AMQPMessage($content); $channel->basic_publish($message);
  15. 15. Basic Consumer Example use PhpAmqpLibMessageAMQPMessage; $channel->basic_consume( 'my_queue', /* some more parameters */ function (AMQPMessage $message) { echo $message->body; } );
  16. 16. Questions?
  17. 17. Thank you! James Titcumb www.jamestitcumb.com www.protected.co.uk www.phphants.co.uk @asgrim Please feedback! https://joind.in/11350

RabbitMQ is a message broker – an application that allows communication between applications by way of a message queuing system. In this talk, we look at some of the basic concepts of RabbitMQ and how it can help effectively scale your applications. These slides are for the lightning talk I gave at Nomad PHP on 22nd May 2014.

Views

Total views

1,387

On Slideshare

0

From embeds

0

Number of embeds

3

Actions

Downloads

15

Shares

0

Comments

0

Likes

0

×