ActiveMQ
  1. ActiveMQ
  2. AMQ-1548

Mutlicast discovery with persistent topics leads to errors

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 5.0.0
    • Fix Version/s: NEEDS_REVIEW
    • Component/s: Broker, Connector
    • Labels:
      None
    • Environment:

      2 Ubuntu machines running virualized named activemq1 and activemq2 set up for multicast discovery. Broker names are set to be the same as the host name

      Description

      After bringing the brokers up and down a few times, I'll get the following errors:

      INFO DemandForwardingBridge - Network connection between vm://activemq2#0 and tcp://activemq1/192.168.2.129:61616(activemq1) has been established.
      ERROR Service - Async error occurred: javax.jms.JMSException: Durable consumer is in use for client: NC_activemq1_inboundactivemq2 and subscriptionName: activemq2_fof
      javax.jms.JMSException: Durable consumer is in use for client: NC_activemq1_inboundactivemq2 and subscriptionName: activemq2_fof
      at org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:75)
      at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:338)
      at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:85)
      at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:80)
      at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:85)
      at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:95)
      at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:525)
      at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:334)
      at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
      at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
      at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
      at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
      at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
      at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
      at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
      INFO DemandForwardingBridge - Network connection between vm://activemq2#0 and tcp://activemq1/192.168.2.129:61616 shutdown due to a local error: javax.jms.JMSException: Durable consumer is in use for client: NC_activemq1_inboundactivemq2 and subscriptionName: activemq2_fof
      INFO TransportConnector - Connector vm://activemq2 Stopped
      INFO DemandForwardingBridge - activemq2 bridge to activemq1 stopped

      My two servers are activemq1 and activemq2. The queue is specified in the activemq.xml using:
      <destinations>
      <topic physicalName="fof" />
      </destinations>

      Through debugging, I tracked this down to a race condition between the listening port (61616) and the created port (incremental) creating the connection. In the one case, it creates a durable topic, in the other it doesn't (I can't remember which is which). Regardless, when the connection fails (or is shutdown) the durable topic isn't stopped, and thus the reconnection fails.

      1. log.txt
        4 kB
        Lekan Omotayo
      2. jms configuration.txt
        4 kB
        Lekan Omotayo
      3. activemq-broker2.xml
        6 kB
        Lekan Omotayo
      4. activemq-broker.xml
        6 kB
        Lekan Omotayo

        Activity

        Timothy Bish made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Incomplete [ 4 ]
        Hide
        Timothy Bish added a comment -

        Without a test case there's little else we can do here.

        Show
        Timothy Bish added a comment - Without a test case there's little else we can do here.
        Jeff Turner made changes -
        Project Import Fri Nov 26 22:32:02 EST 2010 [ 1290828722158 ]
        Hide
        Gary Tully added a comment -

        Lekan, you will need to come up with a test case. I had a cursory look at the two broker configs, both use the same brokerName which is not advisable and both include duplex network connectors, because both have network connectors configured they don't need to be duplex. Not sure if any of that is the root cause though.
        The odd think is that in the servicemix log, some component is connecting to a broker with name testESB which does not seem to be related to either config. It uses the vm://localhost url and can only find a broker with name testESB, where does that broker come from?

        One plan of attack may be to try and reproduce with just camel and activemq, leaving service mix out of the equation to see if the issue can be isolated.

        Show
        Gary Tully added a comment - Lekan, you will need to come up with a test case. I had a cursory look at the two broker configs, both use the same brokerName which is not advisable and both include duplex network connectors, because both have network connectors configured they don't need to be duplex. Not sure if any of that is the root cause though. The odd think is that in the servicemix log, some component is connecting to a broker with name testESB which does not seem to be related to either config. It uses the vm://localhost url and can only find a broker with name testESB, where does that broker come from? One plan of attack may be to try and reproduce with just camel and activemq, leaving service mix out of the equation to see if the issue can be isolated.
        Lekan Omotayo made changes -
        Attachment log.txt [ 19632 ]
        Lekan Omotayo made changes -
        Attachment jms configuration.txt [ 19631 ]
        Attachment activemq-broker.xml [ 19629 ]
        Attachment activemq-broker2.xml [ 19630 ]
        Hide
        Lekan Omotayo added a comment -

        I have two brokers A & B.

        I have attached both activemq config file, my jms provider configuration in camel and the log that comes from servicemix.

        Whenever I send a request from camel into a queue in brokerA, which a consumer in brokerB is listening to, the request never gets to the consumer, instead it goes into DLQ.retailpay.

        It appends DLQ to the queue because somewhere in my activemq config file, I ad specify this:

        <destinationPolicy xmlns="http://activemq.apache.org/schema/core">
        <policyMap>
        <policyEntries>
        <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
        <deadLetterStrategy>
        <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
        </deadLetterStrategy>
        </policyEntry>
        <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
        </policyEntry>
        </policyEntries>
        </policyMap>
        </destinationPolicy>

        Its quite strange, because when I insert message into brokerA's queue from activemq web console, the consumer listening for the message on the queue in brokerB gets the message and samething when I sent the message from "ant producer -Durl=tcp://broker1:61616 -Dtopic=false -Dsubject=myqueue -Ddurable=true -Dmax=1"

        Show
        Lekan Omotayo added a comment - I have two brokers A & B. I have attached both activemq config file, my jms provider configuration in camel and the log that comes from servicemix. Whenever I send a request from camel into a queue in brokerA, which a consumer in brokerB is listening to, the request never gets to the consumer, instead it goes into DLQ.retailpay. It appends DLQ to the queue because somewhere in my activemq config file, I ad specify this: <destinationPolicy xmlns="http://activemq.apache.org/schema/core"> <policyMap> <policyEntries> <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb"> <deadLetterStrategy> <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" /> </deadLetterStrategy> </policyEntry> <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb"> </policyEntry> </policyEntries> </policyMap> </destinationPolicy> Its quite strange, because when I insert message into brokerA's queue from activemq web console, the consumer listening for the message on the queue in brokerB gets the message and samething when I sent the message from "ant producer -Durl=tcp://broker1:61616 -Dtopic=false -Dsubject=myqueue -Ddurable=true -Dmax=1"
        Rob Davies made changes -
        Fix Version/s 5.4.0 [ 12110 ]
        Fix Version/s NEEDS_REVIEWED [ 12186 ]
        Gary Tully made changes -
        Fix Version/s 5.3.0 [ 11914 ]
        Fix Version/s 5.4.0 [ 12110 ]
        Rob Davies made changes -
        Field Original Value New Value
        Fix Version/s 5.3.0 [ 11914 ]
        Jeff Ward created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Jeff Ward
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development