用于查看、标记为完成然后删除的开源队列解决方案

发布于 2024-08-31 14:35:41 字数 1539 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

感情旳空白 2024-09-07 14:35:42

除了基于超时的重新传送之外,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.

小瓶盖 2024-09-07 14:35:42

这就是 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...

桃气十足 2024-09-07 14:35:42

您要求的是标准 JMS 行为 - 任何兼容的 JMS 实现都可以开箱即用地实现该行为。

What you're asking for is standard JMS behaviour - which would be implemented out of the box by any compliant JMS implementation.

薄凉少年不暖心 2024-09-07 14:35:42

通过介绍,我可以说我已经从头开始构建和设计了许多基于消息的系统,使用了许多技术,包括 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文