activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac (JIRA)" <>
Subject [jira] Resolved: (AMQ-1509) Duplicate topic messages received with network of brokers and selectors
Date Thu, 19 Feb 2009 09:15:59 GMT


Dejan Bosanac resolved AMQ-1509.

    Resolution: Fixed

We did some refactoring in this area for another issue, but this generally should be working.

Here's the test case that tries to reproduce the problem (org.apache.activemq.usecases.ThreeBrokerQueueNetworkTest)

    public void testABandBCbrokerNetworkWithSelectors() throws Exception {
        // Setup broker networks
        bridgeBrokers("BrokerA", "BrokerB", dynamicOnly, 2, true);
        bridgeBrokers("BrokerB", "BrokerC", dynamicOnly, 2, true);


        // Setup destination
        Destination dest = createDestination("TEST.FOO", true);

        // Setup consumers
        MessageConsumer clientA = createConsumer("BrokerC", dest, "dummy = 33");
        MessageConsumer clientB = createConsumer("BrokerC", dest, "dummy > 30");
        MessageConsumer clientC = createConsumer("BrokerC", dest, "dummy = 34");

        // let consumers propogate around the network
        // Send messages
        // Send messages for broker A
        HashMap<String, Object> props = new HashMap<String, Object>();
        props.put("dummy", 33);
        sendMessages("BrokerA", dest, MESSAGE_COUNT, props);
        props.put("dummy", 34);
        sendMessages("BrokerA", dest, MESSAGE_COUNT * 2, props);

        // Get message count
        MessageIdList msgsA = getConsumerMessages("BrokerC", clientA);
        MessageIdList msgsB = getConsumerMessages("BrokerC", clientB);
        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);

        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 2) ;

        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
        assertEquals(MESSAGE_COUNT * 3, msgsB.getMessageCount());
        assertEquals(MESSAGE_COUNT *2, msgsC.getMessageCount());

If you find it still not working, please submit the test case similar to the one above

> 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.3.0
>         Attachments:
> 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