Description
We are using request/reply message pattern : Broker1 <- -> Broker2 -> Consumer
producer sending request message to Broker1, using n/w connector [DiscoveryNetworkConnector] message forward to Broker2. Consumer who is receiving message from Broker2 and responding to Broker2. Till this part is working, which should further forward to Broker1 which is not happening.
Broker1 creating temp-queue and listening on that, same temp-queue name created in broker2 and sends to Consumer.
When consumer is responding to that broker2 - temp-queue, here messages are not moving to Broker1.
1) we are using http transport connectors
2) broker1 -> broker2 [prefetch=1000 default], DiscoveryNetworkConnector
3) broker -> consumer [queuePrefetch = 0 working by applying patch of MessagePull from AMQ-6877]
4) components : servicemix 5.6.0 [ AMQ 5.12.3, CAMEL-JMS 2.16.2], jdk 1.8
5) we are using n/w connectors
broker1 -> broker2 [httpconnector]
broker2 -> broker1 [httpconnector]
Code adding networkconnector :
URI uri = new URI("static://" + server.getUrl());
NetworkConnector networkConnector = new DiscoveryNetworkConnector(uri);
networkConnector.setBrokerURL(server.getUrl());
for (String queueName : listOfQueues)
networkConnector.addDynamicallyIncludedDestination(new ActiveMQQueue(queueName));
for (String queueName : excludedQueues)
networkConnector.addExcludedDestination(new ActiveMQQueue(queueName));
networkConnector.setName(uniqueName);
networkConnector.setPassword(pwd);
networkConnector.setUserName(username);
broker.addNetworkConnector(networkConnector);
activemq.xml :
<broker id="broker"
brokerName="jbroker"
dataDirectory="basedir/activemq"
xmlns="http://activemq.apache.org/schema/core"
sslContext="mainsslConxt"
persistent="false"
populateJMSXUserID="true">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue=">" producerFlowControl="true" useCache="false" memoryLimit="64 mb">
<deadLetterStrategy>
<individualDeadLetterStrategy />
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
<managementContext>
<managementContext createMBeanServer="false" createConnector="false" />
</managementContext>
<plugins>
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry queue=">" read="ALL" write="ALL" admin="ADMIN" />
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
<discardingDLQBrokerPlugin dropAll="false" dropOnly="(?!xyz).*" dropTemporaryTopics="true" dropTemporaryQueues="true" />
</plugins>
<transportConnectors>
<transportConnector name="http" uri="http://0.0.0.0:port1" />
<transportConnector name="https" uri="https://0.0.0.0:port2" />
</transportConnectors>
</broker>