.NET 中的 RabbitMQ 订阅者通知
我们现在使用 MSMQ 和 WCF 激活功能,它使我们能够不拉队列来读取消息。它就像向应用程序推送消息。
当我们考虑从 MSMQ 移植到 RabbitMQ 时,我们需要从消息队列中获取所需的内容。
我对 RabbitMQ .net 客户端支持从订阅队列接收消息通知一无所知?
RabbitMQ 中是否有 .net 中的任何东西可以像 MSMQ 一样向订阅者推送通知?
或者我们需要运行不断检查消息的服务?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在AMQP(和RabbitMQ)中,有两种检索消息的方法:basic.get 和 < a href="http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v2.1.0/rabbitmq-dotnet-client-2.1.0-client-htmldoc/html/type-RabbitMQ.Client.IModel。 html#method-M%3aRabbitMQ.Client.IModel.BasicConsume%28System.String,System.Boolean,System.Collections.IDictionary,RabbitMQ.Client.IBasicConsumer%29">basic.consume。
Basic.get 用于轮询服务器以获取消息。如果存在,则将其返回给客户端。如果不是,则返回 get-empty(.NET 方法返回 null)。
Basic.consume 设置队列的消费者。消息到达时,代理将消息推送给消费者。您可以派生 DefaultBasicConsumer,它为您提供自己的自定义消费者,或者您可以使用 订阅消息模式,它为您提供阻塞的 nextDelivery()。
有关更多信息,请查看上面链接的 API 指南和 .NET 客户端用户指南。另外,rabbitmq-discuss 邮件列表是询问 RabbitMQ 相关问题的好地方。
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.
我认为您正在寻找类似 EventingBasicConsumer 之类的东西。另请参阅此问题/答案
I think you are after something like the EventingBasicConsumer. See also this question/answer
这是WAS(Windows 激活服务)提供的功能。现在,WAS 具有用于 net.pipe、net.msmq 和 net.tcp(及其端口共享服务)的侦听器适配器。我想您需要一个特定的 AMQP 侦听器适配器。
这可能会有所帮助 http://msdn.microsoft.com/en-us/library/ ms789006.aspx
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