activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Orner (JIRA)" <>
Subject [jira] Commented: (AMQ-1509) Duplicate topic messages received with network of brokers and selectors
Date Fri, 25 Apr 2008 23:59:43 GMT


Howard Orner commented on AMQ-1509:

Here's a description of how to fix it.  Sorry, I don't have the source available to me right
now to upload it, but it's pretty straight forward.  I'm also doing this from memory so you
may have to look at the code a bit and make sure I'm not missing anything.

The ideal solution would actually apply an 'or' of all selectors before forwarding message
between brokers.  However that appears very difficult to do because of all the classes involved
and the fact that the selector is parsed and cached where its used in other places.  So instead,
the and DurableConduitBridge were modified to change
all incoming subscription selectors to null before adding the subscription to the list of
interested consumers.  This results in excess network traffic because all messages get forwarded
regardless of whether the 'other' brokers will actually deliver them after they apply individual
selectors.  But it works.

In ConduitBridge.addToAlreadyInterestedConsumers() remove the lines that check for a selector.
 Then put in a line that sets the selector to null before doCreateDemandSubscrition is called
in createDemandSubcription.  Do basically the same in DurableConduitBridge.

Rob - If this hasn't really been fixed (it appears not to be), I and I'm sure others would
appreciate it if you would incorporate this into the code.  It would be better to take my
original suggestion of 'or'ing selectors together, but that looks like a lot of code changes,
so this at least fixes the bug with just a few lines of code.  

> Duplicate topic messages received with network of brokers and selectors
> -----------------------------------------------------------------------
>                 Key: AMQ-1509
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Transport
>    Affects Versions: 4.1.1
>            Reporter: Howard Orner
>            Assignee: Rob Davies
>             Fix For: 5.1.0
> If you create a network of two brokers, A and B, one publisher publishing to A, and n
(where n is > 1) receivers with selectors, each receiver recieves n messages for every
1 message sent.  The key here is to have a selector.   It would appear that the conduitSubscriptions
flag does not work when using selectors.  The conduit does not properly reconcile consumers
if they have selectors.  A suggested soltuion would be that ather than process each selector
independantly, each selector should be or'ed together and if any selector results in true
then a single message should be sent to the other broker.
> In doing research, it would appear that this problem was introduced with bug fix AMQ-810.
 Another user reported it via email back to the assignee of AMQ-810 and a short dialog transpired.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message