We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
除了基于超时的重新传送之外,RabbitMQ 开箱即用地执行此操作。如果在消息未被确认时连接被断开,则该消息将被重新排队以传递给队列中的其他消费者。您可以使用拉模式(“Basic.Get”)或推送模式/订阅模式(“Basic.Consume”)让服务器向您提供消息。
RabbitMQ does this out of the box, except for the timeout-based redelivery. If the connection is dropped while a message is unacknowledged, the message will be requeued for delivery to some other consumer of the queue. You can either use pull-mode ("Basic.Get") or push-mode/subscribe-mode ("Basic.Consume") to get the server to feed you messages.
这就是 hornetq 在自动确认模式下的工作方式。它并不是真正的“偷看”,而是将消息传递给侦听器并且对任何其他侦听器不可见。如果侦听器由于死亡、抛出异常等原因未能完成事务,则消息将重新出现在队列中并重新传递给另一个侦听器。如果侦听器成功完成,则该消息将从队列中永久删除。
抱歉,刚刚意识到该线程已经存在一年多了。好吧,也许这会对某人有所帮助......
This is how hornetq works in auto acknowledge mode. It's not really "peeking" , but a message is delivered to a listener and is not visible to any other listener. If the listener fails to complete the the transaction, because it dies, throws an exception, etc. , the message reappears on the queue and is redelivered to another listener. If the listener successfully completes the message is removed from the queue for good.
Sorry, just realized this thread is over a year old. Well, maybe this will help someone...
您要求的是标准 JMS 行为 - 任何兼容的 JMS 实现都可以开箱即用地实现该行为。
What you're asking for is standard JMS behaviour - which would be implemented out of the box by any compliant JMS implementation.
通过介绍,我可以说我已经从头开始构建和设计了许多基于消息的系统,使用了许多技术,包括 CORBA、COM 和本机套接字。
在其中许多方面,重要的是基于技术的设计。
考虑到这一点,我可能会选择从 RabbitMQ 开始,如果需要的话可能会增强它。
从很多方面来说,理解 AMQP 都是令人头疼的事情,但值得花时间,而且我相信它会让你完成这项工作。
即使您无法立即获得确切的功能,重要的问题是您能否让它做到这一点,我相信我可以。毕竟它是开源的。
By way of introduction I can say that I've built and designed many message based systems from the ground up, using many technologies including CORBA, COM and native sockets.
In many of these it is the design that sits on the technology that is important.
Bearing this in mind I would probably choose to start with RabbitMQ and maybe enhance it if needed.
In many ways it is a headful to understand AMQP but it is worth the time, and I believe that it will allow you to make this work.
Even if you can't get the exact functionality out of the box the important question is can you make it do this, which I believe I could. It's opensource after all.