Of Stomp Gem and EventMachine

While hacking at my little project this afternoon, I found out that when I started an EM.run thread running the main listener program while spawning another stompclient.join in the main EM.run .. the callback methods in the main EM methods were not getting called ..

I started to panic a little, because this code was working fine while using AMQP .. (maybe they were using another threading model?) ..

After a little research, I found out that the Stomp Gem join method is also using Eventmachine behind? ..

So if you are in the main EM.run loop for another process and you need to use STOMP to subscribe to other queues, you can remove the .join method from your stomp clients ..

 

Posted 4 months ago

0 comments

Leave a comment...

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     twitter