You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Don Hoffman (JIRA)" <ji...@apache.org> on 2009/02/21 02:48:59 UTC

[jira] Created: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
---------------------------------------------------------------------------------------------

                 Key: AMQ-2135
                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.2.0
         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
            Reporter: Don Hoffman


using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
this bug is not reproducible in 5.1.0.

to reproduce:
run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.

this problem becomes more pronounced and easier to reproduce as the number of brokers increases.

specific configuration used to reproduce:

3 broker config xml files:
testamq1.xml
<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

  <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">

    <persistenceAdapter>
      <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
    </persistenceAdapter>

    <transportConnectors>
      <transportConnector uri="tcp://localhost:61616"/>
    </transportConnectors>

    <networkConnectors>
      <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
    </networkConnectors>

  </broker>
</beans>

testamq2.xml
<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

  <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">

    <persistenceAdapter>
      <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
    </persistenceAdapter>

    <transportConnectors>
      <transportConnector uri="tcp://localhost:61617"/>
    </transportConnectors>

    <networkConnectors>
      <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
    </networkConnectors>

  </broker>
</beans>

testamq3.xml
<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

  <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">


    <persistenceAdapter>
      <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
    </persistenceAdapter>

    <transportConnectors>
      <transportConnector uri="tcp://localhost:61618"/>
    </transportConnectors>

    <networkConnectors>
      <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
    </networkConnectors>

  </broker>
</beans>


run 3 brokers:
bin/activemq xbean:testamq1.xml
bin/activemq xbean:testamq2.xml
bin/activemq xbean:testamq3.xml

run 2 consumers (from examples directory):
ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3

run 1 producer (from examples directory) with 10 messages:
ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10

consumers will not receive all messages.

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


[jira] Resolved: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2135.
-----------------------------

    Fix Version/s: 5.3.1
       Resolution: Fixed

making resolved post Ying's comment on the resolution. 

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>            Assignee: Gary Tully
>             Fix For: 5.3.1
>
>         Attachments: AMQ-2135-022010.patch, AMQ-2135-Patch-03182009.patch, AMQ-2135-UnitTest.patch, AMQ2135Test.java, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Garth Patil (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51442#action_51442 ] 

Garth Patil commented on AMQ-2135:
----------------------------------

The AMQ-2135-Patch-03182009.patch reliably passes the JUnit test case for low MESSAGE_COUNT numbers (e.g. less than 100), but reliably fails the test case when MESSAGE_COUNT is large. I am using 1000 for MESSAGE_COUNT, and it has never passed.

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-Patch-03182009.patch, AMQ-2135-UnitTest.patch, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "ying (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50577#action_50577 ] 

ying commented on AMQ-2135:
---------------------------

I am able to reproduce this when I connect , stop and connect consumers many times. It might be the consumer is not removed cleanly on all the brokers when it disconnected.

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-UnitTest.patch, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Assigned: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reassigned AMQ-2135:
-------------------------------

    Assignee: Gary Tully

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>            Assignee: Gary Tully
>         Attachments: AMQ-2135-022010.patch, AMQ-2135-Patch-03182009.patch, AMQ-2135-UnitTest.patch, AMQ2135Test.java, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Updated: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "ying (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ying updated AMQ-2135:
----------------------

    Attachment: AMQ-2135-Patch-03182009.patch

this AMQ-2135-Patch-03182009.patch fixes the issue. Junit test is passed, test 4 brokers, with producer rotate on each one. 

Note: ConduitBridge.java has change for AMQ-2104, please ignore that. I generate mine on 5.2.0 tag version. Also subscriptionMapByRemoteId is not used by this bridge so i override the parent method to get rid of putting consumer into it. It will never be removed. 

Please review this and apply to trunk once considering this is a valid fix.

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-Patch-03182009.patch, AMQ-2135-UnitTest.patch, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Trevor Pounds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50370#action_50370 ] 

Trevor Pounds commented on AMQ-2135:
------------------------------------

I would like to mention that I have seen something similar with the following configuration:

[producer] -> [broker 1] -> [broker 2] -> consumer

I noticed that I get a small number of messages delivered to broker 2 when the active consumer is closed.  I suspect this has something to do with the preftech limit on the URI which results in one last batch of messages to be dispatched to the broker even though the consumer has been closed. I'm not sure if this is a race condition or not but the scenario mentioned above can be reproduced by producing 1000 messages or so and randomly stopping the consumer on broker 2.

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-UnitTest.patch, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "ying (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59264#action_59264 ] 

ying commented on AMQ-2135:
---------------------------

hi, gary,
it is fixed from 5.3 on. The only thing the user need to add is suppressDuplicateQueueSubscriptions="true" on the networkConnector in the conf if they are using a network of brokers in a certain way. that fixed the issue i saw. No need to apply my patches. thanks

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-022010.patch, AMQ-2135-Patch-03182009.patch, AMQ-2135-UnitTest.patch, AMQ2135Test.java, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Updated: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean O'Callaghan updated AMQ-2135:
----------------------------------

    Attachment: AMQ-2135-UnitTest.patch

Unit test which reproduces the problem

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-UnitTest.patch, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "ying (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58248#action_58248 ] 

ying commented on AMQ-2135:
---------------------------

try suppressDuplicateQueueSubscriptions="true" on the networkConnector in the conf, this issue seems fixed from 5.3 see http://activemq.apache.org/networks-of-brokers.html by default this attribute is false so you will still experience stuck message on a network of broker bridged by multicast

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-022010.patch, AMQ-2135-Patch-03182009.patch, AMQ-2135-UnitTest.patch, AMQ2135Test.java, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Eric Chu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50184#action_50184 ] 

Eric Chu commented on AMQ-2135:
-------------------------------

I have run the same tests and came to the same issue. Using JMX, you can see that the queueSize is n, where n is the number of undelivered messages.

I've also noticed that the undelivered messages will stay on the broker. If you set a consumer to hit the broker with the undelivered message, the messages will be delivered.

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59217#action_59217 ] 

Gary Tully commented on AMQ-2135:
---------------------------------

ying,
can you clarify where you are with this issue. Do we have a test case that fails on 5.2 and works on 5.3.0|5.3.1 or do we still need to apply your patches? I would like to commit the  test case if that is the case and close this.

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-022010.patch, AMQ-2135-Patch-03182009.patch, AMQ-2135-UnitTest.patch, AMQ2135Test.java, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50179#action_50179 ] 

Gary Tully commented on AMQ-2135:
---------------------------------

in the scenario you describe above, can you see messages on broker 3(61618  - with no consumers) in the JMX or WebConsole?

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Updated: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "ying (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ying updated AMQ-2135:
----------------------

    Attachment: AMQ-2135-022010.patch
                AMQ2135Test.java

hi, the old AMQ-2135-UnitTest.patch has a Thread.sleep(1000) so after the producer produce, wait for 1s, then it starts to check how many messages are consumed and apparently when the message number increases, it needs to give more time for the consumer to consume the messages.

I made a patch on today's trunk r906983

Attached are the AMQ2135Test.java which demonstrate the problem with the trunk code. You will see the test will never quit because it will never consume all the messages produced.
and apply AMQ-2135-022010.patch it will fix the issue. 

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: AMQ-2135-022010.patch, AMQ-2135-Patch-03182009.patch, AMQ-2135-UnitTest.patch, AMQ2135Test.java, testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Updated: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Garth Patil (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Garth Patil updated AMQ-2135:
-----------------------------

    Attachment: testamq3.log
                testamq2.log
                testamq1.log

Attached 3 log files from running the example provided in the initial issue (with log4j.logger.org.apache.activemq=TRACE). The result of the test is that the first consumer (connected to 61616) consumes 5 messages, the second consumer (connected to 61617) consumes 2 messages, and 3 messages are orphaned on the 3rd broker (61618).

This seems to be a rather critical bug, given that a simple use case for a network of brokers does not function properly.

> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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


[jira] Commented: (AMQ-2135) network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set

Posted by "Eric Chu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50216#action_50216 ] 

Eric Chu commented on AMQ-2135:
-------------------------------

I have traced through the source code on 5.2 and pin-pointed the following behavior:

org.apache.activemq.broker.region.Queue @ doDispatch(List<QueueMessageReference) 
there is a line of code that checks whether a subscription can be selected for the message based on the message's brokerPath (hops, visited before, etc). This path can potentially fill up to "n". (where n=# of brokers in the network). At that point, it will run through all the subscriptions in the list and not be assigned to any queue and the message gets orphaned on that broker.

I have run the same test and traced through the source code on 5.1 at the same block of code and observed that the brokerPath for a message will never be more than 1. (n=1)


> network of brokers distributes messages to brokers with 0 consumers with dynamicOnly=true set
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2135
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2135
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: linux (centos 4.6) using ActiveMQ 5.2.0 binary distribution
>            Reporter: Don Hoffman
>         Attachments: testamq1.log, testamq2.log, testamq3.log
>
>
> using only the example code, the 5.2.0 release can be made to distribute messages to brokers with no consumers, which remain at those brokers and are never consumed, unless a consumer later connects specifically to those brokers.
> this bug is not reproducible in 5.1.0.
> to reproduce:
> run 3 brokers.  connect a consumer to brokers 1 and 2.  connect a producer to broker 1.  not all messages produced will be received by the 2 consumers.  note that the specific brokers connected to matters for the 3-broker case.  for example, on my machine, if the producer connects to broker 2 instead of broker 1, all messages are received.  you may need to try various combinations of consumer/producer connections to reproduce the problem, but this specific setup breaks reliably for me.
> this problem becomes more pronounced and easier to reproduce as the number of brokers increases.
> specific configuration used to reproduce:
> 3 broker config xml files:
> testamq1.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b1" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data1" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61616"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61617,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq2.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b2" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data2" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61617"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61618)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> testamq3.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
>   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>   <broker brokerName="b3" xmlns="http://activemq.apache.org/schema/core" useJmx="false" advisorySupport="true">
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="activemq-data3" maxFileLength="32mb"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61618"/>
>     </transportConnectors>
>     <networkConnectors>
>       <networkConnector uri="static://(tcp://localhost:61616,tcp://localhost:61617)" dynamicOnly="true" networkTTL="5"/>
>     </networkConnectors>
>   </broker>
> </beans>
> run 3 brokers:
> bin/activemq xbean:testamq1.xml
> bin/activemq xbean:testamq2.xml
> bin/activemq xbean:testamq3.xml
> run 2 consumers (from examples directory):
> ant consumer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> ant consumer -Durl="failover:(tcp://localhost:61617)" -Dsubject="test.queue" -Dmax=100 -DsleepTime=3
> run 1 producer (from examples directory) with 10 messages:
> ant producer -Durl="failover:(tcp://localhost:61616)" -Dsubject="test.queue" -Dmax=10
> consumers will not receive all messages.

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