Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: MB-1129
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Gary Tully
Reporter: Jason Sherman
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
FUSE Message Broker

Duplex option on Network Connector not supported

Created: 29/Mar/12 07:22 PM   Updated: 03/Apr/12 02:35 PM
Component/s: None
Affects Version/s: 5.5.1-fuse-03-06
Fix Version/s: 5.5.1-fuse-04-01

Environment:
Fuse Message Broker 5.5.1-fuse-03-06
Fuse Message Broker 5.3.0.4

External Issue URL: https://issues.apache.org/jira/browse/AMQ-3384


 Description  « Hide
It has been reported and confirmed with testing that when configuring a NetworkConnector as follows messages are not forwarded across the bridge. The scenario for this test case is as follows:

NetworkConnector configured on 5.5.1-fuse-03-06

<networkConnector uri="static:(failover:(tcp://localhost:61616,tcp://localhost:62616))?maxReconnectAttempts=1000;useExponentialBackOff=false;maxReconnectDelay=30000"
                       name="bridge"
                       networkTTL="6"
                       duplex="true"
                       dynamicOnly="false"
                       conduitSubscriptions="true"
                       decreaseNetworkConsumerPriority="false">
                <excludedDestinations>
                </excludedDestinations>
                <dynamicallyIncludedDestinations>
                   <topic physicalName="TEST"/>
                </dynamicallyIncludedDestinations>
                <staticallyIncludedDestinations>
                </staticallyIncludedDestinations>
</networkConnector>

Though the duplex option is configured messages will not flow as follows:

producer -> 5.3.0.4 -> 5.5.1-fuse-03-06 -> consumer

However sending messages in the other direction does work:

consumer <- 5.3.0.4 <- 5.5.1-fuse-03-06 <- producer

It seems in the first case the duplex option is ignored. If the same network connector is used with brokers of the same version, messages can flow in both directions.

Additionally if the network connector is defined in the 5.3.0.4 broker I see messages can flow in both directions.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Gary Tully added a comment - 02/Apr/12 05:12 PM
There is a workaround. The problem stems from the change to the way the destinationFilter[1] is used. In a duplex network, the destinationFilter is propagated to the other end, in this case a 5.3.0, which cannot deal with the changed destinationFilter value.
The workaround is to specify a non default destination filter with a dummy value that can consume the prepended "ActiveMQ.Advisory.Consumer." that is added in 5.3.x
If there are no dynamicallyIncludedDestinations, a value for destinationFilter of "Legacy,ActiveMQ.Advisory.Consumer.>" will suffice.
Otherwise, adding a dummy "legacy" destination to the list of dynamically included destinations will work.
<dynamicallyIncludedDestinations>
                   <topic physicalName="Legacy"/>
                   <topic physicalName="TEST"/>
                </dynamicallyIncludedDestinations>

[1] https://issues.apache.org/jira/browse/AMQ-3384


Gary Tully added a comment - 02/Apr/12 05:13 PM
Also, note that failover should only be used with a network connector of the maxReconnectAttempts=0 because the network connector needs to be aware of transport failures so that it can recreate the forwarding bridge.

Gary Tully added a comment - 03/Apr/12 10:09 AM
linking to https://issues.apache.org/jira/browse/AMQ-3384 where the changes were introduced that are the root cause or the problem.

Jason Sherman added a comment - 03/Apr/12 02:03 PM - edited
I spoke with Gary on this issue this morning. For the work around to work in my testing the destinationFilter needed to be defined in order to get messages to flow from the 5.3.x broker to 5.5.x broker. The configuration used was as follows:
<networkConnectors>
              <networkConnector uri="static:(failover:(tcp://localhost:63616)?maxReconnectAttempts=0)?useExponentialBackOff=false;maxReconnectDelay=30000"
                        name="bridge-551-to-5304M"
                        networkTTL="6"
                        duplex="true"
                        dynamicOnly="false"
                        conduitSubscriptions="true"
                        decreaseNetworkConsumerPriority="false"
                        destinationFilter="Legacy,ActiveMQ.Advisory.Consumer.Topic.TEST">
                <excludedDestinations>
                </excludedDestinations>
                <dynamicallyIncludedDestinations>    
                   <topic physicalName="TEST"/>
                </dynamicallyIncludedDestinations>
                    
                <staticallyIncludedDestinations>
                </staticallyIncludedDestinations>
              </networkConnector>
</networkConnectors>