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

OpenWire compatibility: compound destination does not work with durable topic subscription

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • AMQ 7.2.1.GA
    • AMQ 7.1.0.GA
    • openwire-protocol
    • None
    • Hide

      I am using my general-purpose JMS client [1] "amqutil", but any simple JMS client should be able to demonstrate the problem.

      1. Create a new Artemis instance.
      2. In broker.conf define a couple of multicast addresses:

              <address name="p.IN">
                  <multicast/>
               </address>
               <address name="q.IN">
                  <multicast/>
               </address>
      

      3. Subscribe to both addresses using a compound address:

      amqutil subscribe --destination p.IN,q.IN
      

      This should work, and it should be possible to publish messages to either p.IN or q.IN, and have them received by the subscriber.

      4. Make the subscriber durable, by setting a client ID on the connection

      amqutil subscribe --destination p.IN,q.IN --durable foo
      

      This fails, with an exception.

      5. Repeat with A-MQ 6.3 rather than AMQ 7. Both durable and non-durable subscriptions succeed.

      [1] https://github.com/kevinboone/amqutil

      Show
      I am using my general-purpose JMS client [1] "amqutil", but any simple JMS client should be able to demonstrate the problem. 1. Create a new Artemis instance. 2. In broker.conf define a couple of multicast addresses: <address name= "p.IN" > <multicast/> </address> <address name= "q.IN" > <multicast/> </address> 3. Subscribe to both addresses using a compound address: amqutil subscribe --destination p.IN,q.IN This should work, and it should be possible to publish messages to either p.IN or q.IN, and have them received by the subscriber. 4. Make the subscriber durable, by setting a client ID on the connection amqutil subscribe --destination p.IN,q.IN --durable foo This fails, with an exception. 5. Repeat with A-MQ 6.3 rather than AMQ 7. Both durable and non-durable subscriptions succeed. [1] https://github.com/kevinboone/amqutil

      An OpenWire client can use a compound destination name of the form "a,b,c..." and consume from, or subscribe to, multiple destinations. With AMQ 7, such a compound destination only works for topics when the subscriber is non-durable. Attempting to create a durable subscription on a compound address gives an error message:

      2018-07-23 14:11:31,166 WARN  [org.apache.activemq.artemis.core.server] Errors occurred during the buffering operation : java.lang.IllegalStateException: Cannot create a subscriber on the durable subscription since it already has subscriber(s)
      

      With A-MQ 6 (ActiveMQ 5.11), subscribers to compound destinations can be durable or non-durable. Backward compatibility thus fails for customers with ActiveMQ-based clients and the Artemis-based broker, and upgrading the broker is difficult.

              gaohoward Howard Gao
              rhn-support-kboone Kevin Boone
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: