微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ActiveMQ 清理似乎只是闲逛的旧队列?

如何解决ActiveMQ 清理似乎只是闲逛的旧队列?

所以我有一个每天都在增长的 jboss AMQ 6.3 集群(OpenShift 中的 3 个 pod)。 在 Java 控制台中查看,有很多队列命名为聪明的事物,例如

error-user006107e3-85ce-bdf1-f414-34fc448c1eb4

我假设这是 KahaDB 规模不断扩大的原因(目前每个拆分为 120mb,上周为 100 mb...) 有没有办法清理这些可能的死队列,以防止我们每 2 周就耗尽内存?

编辑:不太确定错误用户是这里的恶棍..但它确实在不断增长..

Edit2:这里是 activemq.xml

<beans xmlns="http://www.springframework.org/schema/beans" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:schemaLocation="http://www.springframework.org/schema/beans    
       http://www.springframework.org/schema/beans/spring-beans.xsd 
           http://activemq.apache.org/schema/core    
           http://activemq.apache.org/schema/core/activemq-core.xsd"> 
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <value>file:${activemq.conf}/credentials.properties</value>
        </property>
    </bean>
    <bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
          lazy-init="false" scope="singleton"
          init-method="start" destroy-method="stop">
    </bean>
    <broker xmlns="http://activemq.apache.org/schema/core"    brokerName="${HOSTNAME}" dataDirectory="${activemq.data}" schedulePeriodForDestinationPurge="10000">
        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb" maxbrowsePageSize="700" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">

                        <networkBridgeFilterFactory>
                            <conditionalNetworkBridgeFilterFactory replayWhenNoConsumers="true" replayDelay="500" />
                        </networkBridgeFilterFactory>
                    </policyEntry>
                    <policyEntry topic=">" producerFlowControl="true" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000">
                        <pendingMessageLimitStrategy>
                            <constantPendingMessageLimitStrategy limit="1000" />
                        </pendingMessageLimitStrategy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>
        <managementContext>
            <managementContext createConnector="false" />
        </managementContext>

        <ioExceptionHandler>
            <defaultIOExceptionHandler ignoreNoSpaceErrors="false"/>
        </ioExceptionHandler>

        <networkConnectors>
            <networkConnector userName="userName" password="password" uri="dns://amq-cluster:61616/?transportType=tcp&amp;queryInterval=30" messageTTL="-1" consumerTTL="1" />
        </networkConnectors>
        <persistenceAdapter>
            <kahaDB directory="${activemq.data}/kahadb" />
        </persistenceAdapter>

        <plugins>
            <jaasAuthenticationPlugin configuration="activemq" />
        </plugins>
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage percentOfJvmHeap="70" />
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="100 gb" />
                </storeUsage>
                <tempusage>
                    <tempusage limit="50 gb" />
                </tempusage>
            </systemUsage>
        </systemUsage>
        <transportConnectors>
            <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;transport.hbGracePeriodMultiplier=2.5" />
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600" />
        </transportConnectors>
        <shutdownHooks>
            <bean xmlns="http://www.springframework.org/schema/beans"    class="org.apache.activemq.hooks.SpringContextHook" />
        </shutdownHooks>
    </broker>
    <!-- Do not expose the console or other webapps
    <import resource="jetty.xml" />
    -->
</beans>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。