After some debugging I was able to understand the problem and I think this is
an issue in the broker logic.
Let me try to explain the case:
*Infra:*
Broker 1
Broker 2
Broker 3
Broker 1 use a core bridge to Broker 2.
Broker 2 and 3 create a cluster of 2 nodes.
*Participants:*
1 Producer
1 Consumer
*Scenarios:*
Scenario 1:
Consumer consuming message in Broker 2 or 3 for this case is the same.
Producer send a *CORE* Message to Broker 1 this do a forward to Broker 2. So
if the Consumer is in Broker 2 gets the message and if the consumer is in
Broker 3, redistribution works as expected and also get the message
Scenario 2:
Consumer consuming message in Broker 2.
Producer send a AMQP Message to Broker 1 this do a forward to Broker 2.
Given the fact Consumer is in Broker 2 everything works as expected.
Scenario 3:
Consumer consuming message in Broker 3.
Producer send a AMQP Message to Broker 1 this do a forward to Broker 2.
Given the fact Consumer is in Broker 3 the message never reaches the
consumer
*Analysis*
After some debugging I was able to find the reason for this and the message
never reaches the consumer because the following code does not return true
in the IF clause
@Override
public void route(final Message message, final RoutingContext context)
throws Exception {
if (isMatchRoutingType(context)) {
queue.route(message, context);
}
}
If seems for Core message the RoutingType is null but for AMQP message the
routing type returns ANYCAST, and my Queue is MULTICAST so the message never
arrays. The following message is shown in the logs "is not going anywhere as
it didn't have a binding on address:BridgeNotifications"
In the case where the consumer is in Broker 2 this works because the routing
type is still null because the workflow is a little different.
*Status*
I totally understand the scenario can be complex and test would be ideal so
I would like your help pointing me out some classes using CORE Message and
AMQP message to create and automatic tests. Also using Bridges so I can
create a test in a fastest way instead of browsing the code.
Thanks and Regards,
Luis
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html