Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ subscriber notification in .NET

Tags:

rabbitmq

We are using MSMQ right now with WCF activation feature, it enables us not to pull queue to read messages. It like push message to application.

As we are looking at porting from MSMQ to RabbitMQ going through what we need from message queue.

I can't anything regarding RabbitMQ .net client support for receiving message notification from subscribed queue?

Is there anything in RabbitMQ with .net which can do push notification to subscriber like MSMQ?

Or we need service running which constantly checks for message?

like image 719
mamu Avatar asked Oct 14 '10 18:10

mamu


3 Answers

In AMQP (and RabbitMQ), there are two ways to retrieve messages: basic.get and basic.consume.

Basic.get is used to poll the server for a message. If one exists, it is returned to the client. If not, a get-empty is returned (the .NET method returns null).

Basic.consume sets the consumer for the queue. The broker pushes messages to the consumer as they arrive. You can either derive DefaultBasicConsumer, which gives you your own custom consumer, or you can use the Subscription Message Pattern, which gives you a blocking nextDelivery().

For more information, check out the API guide linked above and the .NET Client Userguide. Also, a great place to ask RabbitMQ-related questions is the rabbitmq-discuss mailing list.

like image 185
scvalex Avatar answered Nov 27 '22 18:11

scvalex


I think you are after something like the EventingBasicConsumer. See also this question/answer

like image 24
My Other Me Avatar answered Nov 27 '22 19:11

My Other Me


That is a feature provided by WAS (Windows Activation Service). Right now WAS has listener adapters for net.pipe, net.msmq and net.tcp (and its port sharing service). I guess you would need a specific AMQP listener adapter.

This may help http://msdn.microsoft.com/en-us/library/ms789006.aspx

like image 31
Tasio Avatar answered Nov 27 '22 19:11

Tasio