views:

28

answers:

0

Is it possible to start an AMQP subscriber with my Rails app? Possibly through an initializer or something.

I'd like to have it running at the same time that can also interact with Rails models. Below is a pseudo-code example of what I mean.

queue.subscribe do |msg,body|
  Foo.create(....)
end