使用 ActiveMQ 时遇到的问题ruby 中的主动消息传递 gem

发布于 2024-08-03 04:31:15 字数 307 浏览 8 评论 0原文

我在 Rails 应用程序中运行 AMQ + Activemessaging。

我遇到的问题是,activemessaging 在收到消息时不对其进行操作。一旦我重新启动客户端,这个问题就解决了。显然,它可以工作一段时间,但不确定什么时候它会停止表现奇怪。

这会导致消息在读取时丢失,Stomp 客户端配置为 :ack => true 确认已收到消息,但发送消息时没有任何数据可用。

是否有人面临类似的问题或使用 Activemessaging 的替代方案?

您有使用 AMQ + Ruby 的工作场景吗?

干杯,

I have AMQ + Activemessaging running in a Rails App.

I'm facing a problem with activemessaging not acting on messages when they are received. This is solved once i restart the client. Apparently, it works for a while but not sure when it stops acting weirdly.

This is resulting in loss of messages as they are being read, the Stomp client is configured with :ack => true acknowledges the reception of the message, yet, none of the data is available when the message is sent.

Is anyone facing a similar problem or using an alternative for Activemessaging?

Do you have a working scenario using AMQ + Ruby?

Cheers,

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

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

发布评论

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

评论(4

我很OK 2024-08-10 04:31:15

尝试使用 :ack=>'client' 或 :ack=>'auto' 来代替。

:ack=>true 不是一个有效的配置,不知道那会做什么 - 没有什么好处。

有效选项是“客户端”和“自动”(自动是默认值,客户端确保客户端每次确认一条消息,并且在确认最后一条消息之前不会发送另一条消息)。

请参阅此处,了解 ack 选项在 stomp 中的工作原理: http://stomp.codehaus.org/Protocol

干杯,

-安德鲁·库克勒维奇

try :ack=>'client' or :ack=>'auto' instead.

:ack=>true is not a valid config, don't know what that will do - nothing good.

Valid options are 'client' and 'auto' (auto is the default, client makes sure the client acks each message one at a time, and is never sent another message until the last was ack'd).

See here for how ack options work in stomp: http://stomp.codehaus.org/Protocol

Cheers,

-Andrew Kuklewicz

静谧幽蓝 2024-08-10 04:31:15

这是一个旧线程,但只是想提一下,活动消息传递 gem 有一个错误,它没有更新连接 - 它适用于旧版本的 Rails,但在 2.1 左右的某个地方崩溃了。现在它又开始工作了。

This is an old thread, but just wanted to mention that the active messaging gem had a bug where it was not renewing the connections - it was working for older versions of Rails, but broke somewhere around 2.1. It is now working again.

失与倦" 2024-08-10 04:31:15

现在它又开始工作了。

不适合我。使用0.7.1仍然有同样的问题。每隔一段时间,AM 就会与 AMQ 中的订阅队列断开连接。

It is now working again.

Not for me. Using 0.7.1 and still having the same issue. Every once in a while AM gets disconected from a subscribed queue in AMQ.

愿得七秒忆 2024-08-10 04:31:15

致所有 ActiveMessaging 用户:在花费了很长时间试图找出问题并尝试不同的方案和解决方法之后,问题结果是 MySQL 连接超时。由于某种原因,当消息出现在队列中时,连接没有重新建立。任何人都会遇到类似的情况,以及解决方案是什么。
干杯,

康斯坦丁·尼古拉乌

To all ActiveMessaging users: After spending ages trying to figure out the problem and trying different scenarios and work arounds, the problem turned out to be MySQL connection was timing out. For some reason, the connection was not re-established when messages appear in the queue. Anybody faces a similar situation and what was the solution to it.
Cheers,

Constantine Nicolaou

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