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

Divert With Wildcard Results In Duplicate Message Delivery / Poison Acks in Clustered Broker Environment

    XMLWordPrintable

Details

    • Hide

      Example broker.xml for 3-broker cluster attached.

      • Configure a 2-broker cluster with the attach configuration as a template
      • Connect a consumer to one node of the cluster on the TEST.IN address
      • Connect a producer to the other node of the cluster and produce 10 messages to the A.TEST.IN address

      Rather than the expected 10 messages, the broker attempts to route 20 messages to the TEST.IN address, resulting in duplicates / poison acks.

      Note: This does not occur in a single-node environment.

      Show
      Example broker.xml for 3-broker cluster attached. Configure a 2-broker cluster with the attach configuration as a template Connect a consumer to one node of the cluster on the TEST.IN address Connect a producer to the other node of the cluster and produce 10 messages to the A.TEST.IN address Rather than the expected 10 messages, the broker attempts to route 20 messages to the TEST.IN address, resulting in duplicates / poison acks. Note: This does not occur in a single-node environment.
    • +
    • Verified in a release

    Description

      Consider a broker in a cluster configured with the following divert policy:

            <addresses>
               <address name="DLQ">
                  <anycast>
                     <queue name="DLQ" />
                  </anycast>
               </address>
               <address name="ExpiryQueue">
                  <anycast>
                     <queue name="ExpiryQueue" />
                  </anycast>
               </address>
               <address name="TEST.IN">
                  <anycast>
                     <queue name="TEST.IN"/>
                  </anycast>
               </address>
               <address name="A.TEST.IN">
                  <anycast>
                     <queue name="A.TEST.IN"/>
                  </anycast>
               </address>
      
            </addresses>
      
            <diverts>
              <divert name="TEST">
                      <routing-name>TEST-divert</routing-name>
                      <address>*.TEST.IN</address>
                      <forwarding-address>TEST.IN</forwarding-address>
                      <exclusive>true</exclusive>
              </divert>
            </diverts>
      

      With a standalone broker instance, sending 10 messages to the A.TEST.IN address correctly results in 10 messages forwarded to TEST.IN and 10 dequeues to the consumer listening on that address.

      When the broker is clustered, the same policy added to one or both the clustered brokers results in 20 forwards from A.TEST.IN to TEST.IN and duplicate messages / poison acknowledgements at the client.

      Adding explicit wildcard address configuration did not seem to change the behavior:

            <wildcard-addresses>
               <routing-enabled>true</routing-enabled>
               <delimiter>.</delimiter>
               <any-words>#</any-words>
               <single-word>*</single-word>
            </wildcard-addresses>
      

      Attachments

        Issue Links

          Activity

            People

              ataylor@redhat.com Andy Taylor
              rhn-support-dhawkins Duane Hawkins
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: