我們正在運行ActiveMQ 5.6.0。在我們的測試環境中,我們有3個經紀人在靜態網絡中運作。這是當前的情況。我們有6個消費者隨機連接到3個經紀人。一個經紀人有3個消費者,第二個有2個,第三個有1個。當我們把消息堆積到隊列中時,我們看到消息在第三個消費者上被消費者記錄下來,另外兩個消費者沒有給出的積壓和其餘5名消費者閒置。ActiveMQ,經紀人網絡,閒置消費者
下面您可以找到我們的所有經紀商(dev.queue01)的配置,其他兩個與靜態主機名的適當更改類似。
我認爲消息會自動分配給其他經紀人供消費者使用。請告訴我,如果我在描述問題時遺漏了某些東西。預先感謝任何指導。
http://www.springframework.org/schema/beans/spring-beans-2.0.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>
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="prd.queue01" dataDirectory="${activemq.data}">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="false" memoryLimit="1mb">
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="false" memoryLimit="64mb" optimizedDispatch="true" enableAudit="false" prioritizedMessages="true">
<networkBridgeFilterFactory>
<conditionalNetworkBridgeFilterFactory replayWhenNoConsumers="true" />
</networkBridgeFilterFactory>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext createConnector="true"/>
</managementContext>
<persistenceAdapter>
<amqPersistenceAdapter directory="${activemq.data}/data/amqdb"/>
</persistenceAdapter>
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="256 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="750 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="750 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616" updateClusterClients="true" updateClusterClientsOnRemove="true" rebalanceClusterClients="true"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="static:(tcp://dev.queue02:61616,tcp://dev.queue03:61616)" name="queues_only" conduitSubscriptions="false" decreaseNetworkConsumerPriority="false" networkTTL="4">
<dynamicallyIncludedDestinations>
<queue physicalName=">"/>
</dynamicallyIncludedDestinations>
<excludedDestinations>
<topic physicalName=">"/>
</excludedDestinations>
</networkConnector>
</networkConnectors>
</broker>
<import resource="jetty.xml"/>
謝謝,請試試看! –
建議消息正常工作,所以這不是很不幸。我在這裏遇到了這個參數「sendAdvisoryIfNoConsumers」:http://activemq.apache.org/advisory-message.html 接下來我們會試試這個。 –