Q:

Message broadcasting using rabbitmq, genbunny and cowboy event notifier

I have two instances of cowboy server running which are connected to RabbitMQ.  I am using gen_bunny as RabbitMQ client to connect to RabbitMQ.
I can consume the message to from rabbitMQ if using bunnyc:consume(). However for that I need to fire this method explicitly. What I want is to bind an event on cowboy so as soon as there is  a message in the Queue it should automatically notify to cowboy.
Is it possible using gen_bunny or other erlang client? 

A:

Got it worked ... After some tweaking in the bunnyc.erl source. Now, In init function i have added subscription function and in start_link function in bunnyc.erl passing the process id of my cowboy process so as soon as there is a message in the queue I can get it in websocket_info function of cowboy..

