ActiveMQ消息分组性能

发布于 2024-07-16 08:07:50 字数 327 浏览 5 评论 0原文

有人用过ActiveMQ的消息分组功能吗?

http://activemq.apache.org/message-groups.html

这将是对于我正在从事的项目来说,这是非常有用的功能,但我很好奇这个功能的扩展和性能如何。 在我们的系统中,我们需要将消息分为大约 3-5 条消息的组,因此我们将在流程运行时不断添加组。 在这种情况下,我们似乎最终会在尝试存储所有组时耗尽内存。

我对任何经验/想法/优点/缺点感兴趣。

Has anyone used the Message Grouping feature in ActiveMQ?

http://activemq.apache.org/message-groups.html

This would be a really useful feature for a project I'm working on, but I'm curious how well this feature scales and performs. In our system, we would need to group messages into groups of about 3-5 messages, so we would be continuously adding groups as the process runs. In this case, it seems like we'd eventually just run out of memory trying to store all the groups.

I'm interested in any experiences/thoughts/pros/cons.

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

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

发布评论

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

评论(1

梅窗月明清似水 2024-07-23 08:07:50

我在许多项目中使用过消息组,效果非常好。 不过,为了充分披露,我是推动消息组的人之一,并完成了大部分初始实施工作。

消息组的用例来自于对大型主题层次结构进行分区; 比如处理金融股票代码之类的。 我们希望消息组能够使用非常细粒度的关联表达式(JMSXGroupID 字符串) - 因此您可以使用日期、股票代码和产品类型作为 groupID - 或者客户或业务交易 ID 等。

为了避免将每个组 ID 字符串保留在内存中,默认提供程序使用哈希桶 - 因此我们只存储哈希桶到消费者的映射 - 而不是单个字符串。 因此,它可以扩展到您想要使用的任意数量的组 ID! 这也意味着我们不必“清理”旧的消息组 ID 等

I've used Message Groups on many projects and it works great. Though for full disclosure I was one of the folks pushing for Message Groups and did much of the initial implementation work.

The use case of Message Groups came from partitioning large topic hierarchies; such as dealing with financial stock symbols and the like. We wanted message groups to be able to use very fine grained correlation expressions (JMSXGroupID strings) - so you could use the date, stock symbol and product type as groupID - or the customer or business transaction ID or whatever.

To avoid having to keep every group ID string in memory, the default provider uses hash buckets - so we only store the mapping of hash buckets to consumers - not the individual strings. So it scales to as many group IDs as you want to use! It also means we don't have to 'clean' the old message group IDs out etc

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