所以我有一个每天都在增长的 jboss AMQ 6.3 集群(OpenShift 中有 3 个 pod)。在 Java 控制台中查看,有很多队列命名为聪明的东西,比如
error-user006107e3-85ce-bdf1-f414-34fc448c1eb4
我假设这是 KahaDB 大小不断增长的原因(目前每个拆分为 120mb,上周为 100...)有没有办法清理这些可能的死队列以阻止我们每 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&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&wireFormat.maxFrameSize=104857600&transport.hbGracePeriodMultiplier=2.5" />
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&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>