Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-962

Message Lost in Clustered A-MQ7 Brokers When Message Is Sent From EAP Resource Adapter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • AMQ 7.0.3.GA
    • None
    • None
    • Hide
      1. Start clustered AMQ brokers.
      2. Start EAP app(message provider) which uses a resource adapter.
      3. Submit several messages to the queue on the clustered brokers from the EAP app.
        [result]
        The first clustered broker hold the messages, as expected.
        But the second or higher clustered brokers reject the messages. It should hold the messages.

      Reproducer app is attached below

      Show
      Start clustered AMQ brokers. Start EAP app(message provider) which uses a resource adapter. Submit several messages to the queue on the clustered brokers from the EAP app. [result] The first clustered broker hold the messages, as expected. But the second or higher clustered brokers reject the messages. It should hold the messages. Reproducer app is attached below

      Although a JMS producer application which uses a resource adapter does not get any Exception, message will not be persist in a clustered broker.

      [Setting]

      • AMQ
        cd <AMQ7.0.3 directory>
        
        ./bin/artemis create sampleBrokerM0 --user guest --role guest --password password --allow-anonymous --default-port 61616 --http-port 8161 
        
        ./bin/artemis create sampleBrokerM1 --user guest --role guest --password password --allow-anonymous --default-port 61617 --http-port 8162 
        
        cp examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server0/broker.xml sampleBrokerM0/etc
        
        cp examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server1/broker.xml sampleBrokerM1/etc
        
        # # Note: Above broker.xml definitions have `exampleQueue` queue in `exampleQueue` address.
        
        # DEBUG level log is useful
        Change to `logger.level=DEBUG` on etc/logging.properties
        
      • EAP
        I attached standalone-full.xml
        point of setting
        <remote-connector name="remote-connector-hfuruich-amq1" socket-binding="remote-hfuruich-amq1"/>
        
        <connection-factory name="RemoteHfuruichAMQConnectionFactory" entries="java:/jms/remote_cf" connectors="remote-connector-hfuruich-amq1"/>
        
        <outbound-socket-binding name="remote-hfuruich-amq1">
            <remote-destination host="xxxx.xxxx.xxxx.xxxx" port="61616"/>
        </outbound-socket-binding>
        

        download and an attached reproducer "minimize-messaging-web.zip"
        -> mvn install
        -> deploy

      [Instruction to reproduce]

      1. Start clustered 2 AMQ brokers
      2. Start EAP
        standalone.sh --server-config=standalone-full.xml
      3. Execute the following command 2 times to post 2 messages on the clustered brokers.
        curl 'http://localhost:8080/minimal/queue/exampleQueue' -XPOST --data 'message=messagebody'
        

      [result]
      The sampleBrokerM0 hold the first message on the `exampleQueue`, as expected.
      Tne sampleBrokerM1 does not persist the second message, and output following debug log. It should hold the second message. In addition to it, Produce app does not receive any Exception so client will believe the message is successfully sent.

      13:39:32,679 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] Couldn't find any bindings for address=jms.queue.exampleQueue on message=CoreMessage[messageID=108,durable=true,userID=195e5944-eb89-11e7-b526-c85b76bd6ea0,priority=4, timestamp=Thu Dec 28 13:39:32 JST 2017,expiration=0, durable=true, address=jms.queue.exampleQueue,properties=TypedProperties[__AMQ_CID=5eec3fd8-eb88-11e7-b526-c85b76bd6ea0,_AMQ_ROUTE_TO=[0000 0000 0000 0004),bytesAsLongs(4]]]@574408633
      13:39:32,679 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] Message CoreMessage[messageID=108,durable=true,userID=195e5944-eb89-11e7-b526-c85b76bd6ea0,priority=4, timestamp=Thu Dec 28 13:39:32 JST 2017,expiration=0, durable=true, address=jms.queue.exampleQueue,properties=TypedProperties[__AMQ_CID=5eec3fd8-eb88-11e7-b526-c85b76bd6ea0,_AMQ_ROUTE_TO=[0000 0000 0000 0004),bytesAsLongs(4]]]@574408633 is not going anywhere as it didn't have a binding on address:jms.queue.exampleQueue
      

      Since debug logs similar to ENTMQBR-961(https://issues.jboss.org/browse/ENTMQBR-961) are output, it may have the same root cause. However, this problem occurs even if the queue already exists, so there is no workaround.

        1. broker.xml
          8 kB
        2. logs.zip
          39 kB
        3. minimize-messaging-web.zip
          5 kB
        4. standalone-full.xml
          31 kB

              mtaylor1@redhat.com Martyn Taylor (Inactive)
              rhn-support-tyamashi Tomonari Yamashita
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: