开发者

How do I ensure a topic is removed from an ActiveMQ broker

开发者 https://www.devze.com 2023-03-05 05:56 出处:网络
开发者_StackOverflowI am having some trouble with an ActiveMQ broker not removing unused topics from it\'s memory.

开发者_StackOverflowI 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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号