Hey all,<br><br>I've scoured the internet and this mailing list for Unicorn + Amqp examples and can't seem to find anything that works for my use case, which is presumably a very common one.&nbsp; Basically, based on user web requests I want to publish messages to a queue, have them processed on another server, and then show the results to the user.&nbsp; I would be extremely grateful is someone could provide any insight here.<br><br>So my current design (based mostly on the Amqp gem examples and this gist: <a href="https://gist.github.com/2692861">https://gist.github.com/2692861</a>) waits for a unicorn worker to fork, runs the EM in another thread, and then does a next_tick that creates the connection to the server.&nbsp; Two issues:<br><br>1. From my controllers, what is the best way to publish messages?&nbsp; That gist has the controllers calling "EventLoopHelper.run" and then publishing, but shouldn't the EM already be running in another thread?&nbsp; It seems like I should be calling next_tick with a block that publishes a message, that way on the next reactor tick the message will get published.&nbsp; But when I use next_tick, the messages get publishes sometimes and other times nothing happens.&nbsp; That is, someones the message isn't published and other times a bunch of messages are published.&nbsp; Is this a thread safety issue or am I just completely missing something?&nbsp; I haven't event attempted to add subscribe functionality into the reactor yet, so nothing should be blocking the reactor.<br><br>2. I also want my unicorn rails app to subscribe to a queue that has the result of the long-running jobs that occur on another server.&nbsp; If I call subscribe in the reactor event loop, will that block the reactor from publishing messages submitted by the controllers?<br><br>Any help would be much appreciated!<br><br>-Milo<br><br>