如何确保主题从 ActiveMQ 代理中删除

发布于 2024-11-07 04:59:46 字数 281 浏览 5 评论 0原文

我遇到了一些问题,ActiveMQ 代理无法从其内存中删除未使用的主题。

目前,我们的系统被设计为动态生成许多主题,并在运行时指定名称。这些主题在应用程序的生命周期内存在,然后该主题的所有消费者和生产者都会取消订阅。然而,activemq 代理不会从其列表中删除这些主题(可从 Web 控制台查看)。

我已编辑默认配置文件代理以设置 permanent="false" 和 AdvisorySupport="false"。对我来说,这应该从经纪人中删除主题,但我显然错过了一些东西。

有人可以帮忙吗?

I am having some trouble with an ActiveMQ broker not removing unused topics from it's memory.

Currently our system is designed to generate many topics dynamically with names designated at runtime. These topics exist for the duration of the applications lifespan and then all consumers and producers for the topic unsubscribe from it. The activemq broker however does not remove these topics from its list (viewable from the web console).

I have edited the default config file broker to set persistent="false" and advisorySupport="false". To me this should remove the topics from the broker but I am obviously missing something.

Can anyone help?

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

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

发布评论

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

评论(2

情绪 2024-11-14 04:59:46

默认情况下,代理不会删除目标,但您可以通过配置策略来启用此行为。请参阅 AMQ 网站上的此帮助主题

The broker won't remove destinations be default however you can enable this behaviour by configuring a policy to do so. See this help topic on the AMQ website.

栀子花开つ 2024-11-14 04:59:46

发现问题了。问题不在于应用程序正在做什么,而在于代理配置。我必须

<policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">

在经纪人政策图中指定。我不知道我怎么错过了这个。

Found the problem. The problem wasn't what the applications were doing, it was in the broker configuration. I had to specify

<policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">

In the brokers policy map. I don't know how I missed this.

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