[rabbitmq-discuss] Subscriber Message Received event?

Matthias Radestock matthias at lshift.net
Mon Feb 8 18:10:29 GMT 2010


Bob,

Bob Brown wrote:
> We are using C# and Rabbit MQ and will be using Pub Sub. Is there an 
> "onMessageReceived" event that will fire once a message is received? 
> Currently we are having to use a background worker thread that runs and 
> checks if there are any messages in the queue. But a messageReceived 
> event would be more ideal. Thanks for any input!

There isn't a C# event, but there is a callback HandleBasicDeliver 
method on IBasicConsumer that serves the same purpose. See 
http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v1.7.1/rabbitmq-dotnet-client-1.7.1-client-htmldoc/html/type-RabbitMQ.Client.IBasicConsumer.html#method-M:RabbitMQ.Client.IBasicConsumer.HandleBasicDeliver%28System.String,System.UInt64,System.Boolean,System.String,System.String,RabbitMQ.Client.IBasicProperties,System.Byte[]%29 



Regards,

Matthias.




More information about the rabbitmq-discuss mailing list