Tag Archives: rabbitmq

rabbit racing

somehow my rabbitmq code stopped working. maybe the fact that i did not touch it for a month or so while changing everything around it had something to do with it. or maybe not.

anyway, what was happening was that one node would post stuff on a specific queue in a specific topic. the other nodes were listening for these message, which seemed to never arrive. taking the code out and retrying it with smaller parts it always seemed to work.

well, the problem was that rabbitmq happily lets you post stuff on a queue and a topic that has not been created at all. so you can send messages to places that do not exist. and you get no error message. in my case, the receiving nodes would declare their queues, but only after getting a session initiation from the sending node. if the sending node initiates the session and then sends messages to the client queue before the client has declared it, all gets lots forever. nice..

solution: before sending anything anywhere, always declare all the associated queues, topics and whatever yourself first. and now it works. weird kind of race condition that.