RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Queueing in Ruby with AMQP

This post on Queueing in Ruby with AMQP covers installing Erlang, RabbitMQ, and the Ruby AMQP library as well as performing some very rudimentary queueing and dequeueing snippets.

Comments

Little question. Does someone manage to use Workling + AMQP + RabbitMQ + Passenger ? I’ve tried to use the AMQP gem with Passenger and it does not seem to work without heavy patching… BTW, Starling + Passenger seems to work without problem without patching.

The problem with AMQP (or any EventMachine library, really) and Passenger is that Passenger forks the Ruby process after the init part of booting, right before it’s ready to handle requests. This causes the background thread that EventMachine uses behind in the old process. You can’t start the EventMachine reactor in the first process… there are ways around it, but the recommended way is to use a specific Passenger callback… which escapes me right now. Check out the AMQP Google group, the answer was recently shared on there; check out the threads on Passenger/Apache.

You can also try an alternative amqp client that doesn’t use EventMachine. Try bunny http://github.com/celldee/bunny/tree/master or carrot http://github.com/famoseagle/carrot/tree/master. We are using carrot (we didn’t know of bunny at the time) to replace amit gupta’s amqp when we moved to passenger. Haven’t had any issues.

konya chat thanks admin

iste size çetsitesi bedava -bedava chat ortamı vardır-sohbet odasıherşey için tesekkurler-chat sitesi yorumlar sizden-chat sitesi- destekleme bizden chat sitesi- alem buysa chat odası- kral benim :) sex chat- cinsellik serbest sex sohbet

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in