8

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?

Josh Kelley
  • 56,064
  • 19
  • 146
  • 246
mamu
  • 12,184
  • 19
  • 69
  • 92
  • FWIW, NServiceBus is designed to take care of this for you, and it has a RabbitMQ transport – https://docs.particular.net/transports/rabbitmq/ – Adam Ralph Jul 07 '22 at 07:39

3 Answers3

12

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.

scvalex
  • 14,931
  • 2
  • 34
  • 43
5

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

Community
  • 1
  • 1
My Other Me
  • 5,007
  • 6
  • 41
  • 48
1

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

Tasio
  • 351
  • 1
  • 12