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

Message Flow Continues Across Federation Broker Connection After Consumers are Removed, Even with Auto Delete Enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • broker-core
    • None
    • False
    • None
    • False
    • Hide

      1. Deploy two brokers in federation (configuration attached)
      2. Start a producer on one broker and let it complete:
      ./artemis producer --destination=topic://TEST.OO.T --protocol=AMQP --acceptor=artemis --url=amqp://node1.test.redhat.com:61616 --message-count=100 --user=admin --password=admin
      3. No messages are routed on the opposing broker
      4. Start a consumer on the opposing broker:
      ./artemis consumer --destination=topic://TEST.OO.T --protocol=AMQP --acceptor=artemis --url=amqps://node4.test.redhat.com:61616 --user=admin --password=admin
      5. Rerun the producer on the source broker.
      6. Addresses are created and messages are observed to move across the federation connector
      7. Stop the consumer
      8. Rerun the producer on the source broker
      9. Logging and routing counts on the address indicate messages are still moving across the bridge, though demand should be gone

      Show
      1. Deploy two brokers in federation (configuration attached) 2. Start a producer on one broker and let it complete: ./artemis producer --destination=topic://TEST.OO.T --protocol=AMQP --acceptor=artemis --url=amqp://node1.test.redhat.com:61616 --message-count=100 --user=admin --password=admin 3. No messages are routed on the opposing broker 4. Start a consumer on the opposing broker: ./artemis consumer --destination=topic://TEST.OO.T --protocol=AMQP --acceptor=artemis --url=amqps://node4.test.redhat.com:61616 --user=admin --password=admin 5. Rerun the producer on the source broker. 6. Addresses are created and messages are observed to move across the federation connector 7. Stop the consumer 8. Rerun the producer on the source broker 9. Logging and routing counts on the address indicate messages are still moving across the bridge, though demand should be gone
    • Important

      When configuring bidirectional address federation between brokers:

            <broker-connections>
              <amqp-connection uri="tcp://node1.test.redhat.com:61616" name="federation-node1" user="admin" password="admin">
                <federation>
                   <local-address-policy name="node4-address-policy" max-hops="1" auto-delete="true" auto-delete-delay="1000" auto-delete-message-count="-1">
                     <include address-match="#"/>
                   </local-address-policy>
                   <remote-address-policy name="node1-address-policy" max-hops="1" auto-delete="true" auto-delete-delay="1000" auto-delete-message-count="-1">
                     <include address-match="#"/>
                   </remote-address-policy>
                   <local-queue-policy name="node4-queue-policy" include-federated="false">
                     <include queue-match="#" address-match="#"/>
                   </local-queue-policy>
                </federation>
              </amqp-connection>
            </broker-connections>
      
               <address-setting match="#">
                  <dead-letter-address>DLQ</dead-letter-address>
                  <expiry-address>ExpiryQueue</expiry-address>
                  <redelivery-delay>0</redelivery-delay>
                  <max-size-bytes>-1</max-size-bytes>
                  <max-size-messages>-1</max-size-messages>
                  <page-size-bytes>10M</page-size-bytes>
                  <max-read-page-messages>-1</max-read-page-messages>
                  <max-read-page-bytes>20M</max-read-page-bytes>
                  <message-counter-history-day-limit>10</message-counter-history-day-limit>
                  <address-full-policy>PAGE</address-full-policy>
                  <auto-create-queues>true</auto-create-queues>
                  <auto-create-addresses>true</auto-create-addresses>
                  <auto-delete-queues>true</auto-delete-queues>
                  <auto-delete-queues-delay>1000</auto-delete-queues-delay>
                  <auto-delete-queues-message-count>-1</auto-delete-queues-message-count>
                  <auto-delete-addresses>true</auto-delete-addresses>
                  <auto-delete-addresses-delay>1000</auto-delete-addresses-delay>
               </address-setting>
      

      If a producer attaches to the upstream broker with no consumers present on the downstream broker and produces messages, they are not pushed across the federation bridge to the downstream broker.

      If a consumer connects to the downstream broker, message flow is observed across the bridge, as expected, but..

      When the consumers disconnect, the addresses are not cleaned up on the target broker and federation-related queues remain under the addresses. If messages are again sent to the upstream broker, they continue to flow across the federation connector and are only discarded on the target broker after receipt.

              rhn-support-tbish Tim Bish
              rhn-support-dhawkins Duane Hawkins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: