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

Broker Connections with mirror are removing queue with queue-removal="false"

XMLWordPrintable

    • False
    • False
    • Undefined
    • Hide

      created a broker with command:

      $ amq-broker-7.8.0/bin/artemis create main --user admin --password admin --allow-anonymous

       

      added to the config:

      <broker-connections>
          <amqp-connection uri="tcp://10.0.134.16:6700" name="DRSite">
              <mirror queue-removal="false"/>
          </amqp-connection>
      </broker-connections>

       

      Replica:

      created a broker with command:
      $ artemis create --user admin --password admin --allow-anonymous ~/replica

       

      added to the config:
      an acceptor:

      <acceptor name="dr">tcp://0.0.0.0:6700?autoStart=true;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true</acceptor>

       

      an address settings on catch all rule to ensure address and queues created are not removed by broker:

      <auto-delete-addresses>false</auto-delete-addresses>
      <auto-delete-queues>false</auto-delete-queues>

      ensure there is no queue or messages create on main broker:

      $ main/bin/artemis queue stat --url tcp://10.0.132.32:61616
      Connection brokerURL = tcp://10.0.132.32:61616
      |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |
      |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST |
      |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|1 |0 |2037 |0 |2037 |0 |ANYCAST |
      |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST |
      |activemq.management.cb45a072-2003-42a1-b5b8-e28538e80fd0|activemq.management.cb45a072-2003-42a1-b5b8-e28538e80fd0|1 |0 |0 |0 |0 |0 |MULTICAST |
       
      

      ensure there is no queue or messages create on replica broker:

      $ main/bin/artemis queue stat --url tcp://10.0.134.16:61616
      Connection brokerURL = tcp://10.0.134.16:61616
      |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |
      |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST |
      |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|0 |0 |0 |0 |0 |0 |ANYCAST |
      |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST |
      |activemq.management.c60ea0bb-65ab-4975-ade4-5a9176b30751|activemq.management.c60ea0bb-65ab-4975-ade4-5a9176b30751|1 |0 |0 |0 |0 |0 |MULTICAST |
      

       

      Produce messages on main broker using:

      $ main/bin/artemis producer --url tcp://10.0.132.32:61616
      Connection brokerURL = tcp://10.0.132.32:61616
      Producer ActiveMQQueue[TEST], thread=0 Started to calculate elapsed time ...
      Producer ActiveMQQueue[TEST], thread=0 Produced: 1000 messages
      Producer ActiveMQQueue[TEST], thread=0 Elapsed time in second : 2 s
      Producer ActiveMQQueue[TEST], thread=0 Elapsed time in milli second : 2371 milli seconds
      

       

      Check if messages are on main broker:

      $ main/bin/artemis queue stat --url tcp://10.0.132.32:61616
      Connection brokerURL = tcp://10.0.132.32:61616
      |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |
      |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST |
      |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|1 |0 |3045 |0 |3045 |0 |ANYCAST |
      |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST |
      |TEST |TEST |0 |1000 |1000 |0 |0 |0 |ANYCAST |
      |activemq.management.28ccdf7b-2500-482d-a6f9-8cdd42c67afc|activemq.management.28ccdf7b-2500-482d-a6f9-8cdd42c67afc|1 |0 |0 |0 |0 |0 |MULTICAST |
      

       

      Check if message were replicated to replica broker:

      $ main/bin/artemis queue stat --url tcp://10.0.134.16:61616
      Connection brokerURL = tcp://10.0.134.16:61616
      |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |
      |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST |
      |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|0 |0 |0 |0 |0 |0 |ANYCAST |
      |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST |
      |TEST |TEST |0 |1000 |1000 |0 |0 |0 |ANYCAST |
      |activemq.management.06237c3c-ce59-4b89-9dde-8db098724795|activemq.management.06237c3c-ce59-4b89-9dde-8db098724795|1 |0 |0 |0 |0 |0 |MULTICAST |
      

       

      Consume message from main broker:

      $ main/bin/artemis consumer --url tcp://10.0.132.32:61616
      Connection brokerURL = tcp://10.0.132.32:61616
      Consumer:: filter = null
      Consumer ActiveMQQueue[TEST], thread=0 wait until 1000 messages are consumed
      Received 1000
      Consumer ActiveMQQueue[TEST], thread=0 Consumed: 1000 messages
      Consumer ActiveMQQueue[TEST], thread=0 Elapsed time in second : 0 s
      Consumer ActiveMQQueue[TEST], thread=0 Elapsed time in milli second : 122 milli seconds
      Consumer ActiveMQQueue[TEST], thread=0 Consumed: 1000 messages
      Consumer ActiveMQQueue[TEST], thread=0 Consumer thread finished
      

       

      Ensure messages were consumed on main broker and queue were removed:

      $ main/bin/artemis queue stat --url tcp://10.0.132.32:61616
      Connection brokerURL = tcp://10.0.132.32:61616
      |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |
      |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST |
      |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|1 |0 |4053 |0 |4053 |0 |ANYCAST |
      |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST |
      |activemq.management.b21f9ee1-0632-40ee-b491-0045aaa65d3b|activemq.management.b21f9ee1-0632-40ee-b491-0045aaa65d3b|1 |0 |0 |0 |0 |0 |MULTICAST |

      Expect to have the queue remains created on replica broker, but it was removed:

      $ main/bin/artemis queue stat --url tcp://10.0.134.16:61616
      Connection brokerURL = tcp://10.0.134.16:61616
      |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |
      |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST |
      |DRSite2a61bc0e-4610-4e7b-ab32-d70fc3c3c9c6|DRSite2a61bc0e-4610-4e7b-ab32-d70fc3c3c9c6|0 |0 |0 |0 |0 |0 |ANYCAST |
      |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST |
      |activemq.management.ae0a4958-9deb-4825-8fe4-489cf975c5c4|activemq.management.ae0a4958-9deb-4825-8fe4-489cf975c5c4|1 |0 |0 |0 |0 |0 |MULTICAST |

       

      Show
      created a broker with command: $ amq-broker-7.8.0/bin/artemis create main --user admin --password admin --allow-anonymous   added to the config: <broker-connections> <amqp-connection uri="tcp://10.0.134.16:6700" name="DRSite"> <mirror queue-removal="false"/> </amqp-connection> </broker-connections>   Replica: created a broker with command: $ artemis create --user admin --password admin --allow-anonymous ~/replica   added to the config: an acceptor: <acceptor name="dr">tcp://0.0.0.0:6700?autoStart=true;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true</acceptor>   an address settings on catch all rule to ensure address and queues created are not removed by broker: <auto-delete-addresses>false</auto-delete-addresses> <auto-delete-queues>false</auto-delete-queues> ensure there is no queue or messages create on main broker: $ main/bin/artemis queue stat --url tcp://10.0.132.32:61616 Connection brokerURL = tcp://10.0.132.32:61616 |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE | |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST | |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|1 |0 |2037 |0 |2037 |0 |ANYCAST | |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST | |activemq.management.cb45a072-2003-42a1-b5b8-e28538e80fd0|activemq.management.cb45a072-2003-42a1-b5b8-e28538e80fd0|1 |0 |0 |0 |0 |0 |MULTICAST |   ensure there is no queue or messages create on replica broker: $ main/bin/artemis queue stat --url tcp://10.0.134.16:61616 Connection brokerURL = tcp://10.0.134.16:61616 |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE | |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST | |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|0 |0 |0 |0 |0 |0 |ANYCAST | |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST | |activemq.management.c60ea0bb-65ab-4975-ade4-5a9176b30751|activemq.management.c60ea0bb-65ab-4975-ade4-5a9176b30751|1 |0 |0 |0 |0 |0 |MULTICAST |   Produce messages on main broker using: $ main/bin/artemis producer --url tcp://10.0.132.32:61616 Connection brokerURL = tcp://10.0.132.32:61616 Producer ActiveMQQueue[TEST], thread=0 Started to calculate elapsed time ... Producer ActiveMQQueue[TEST], thread=0 Produced: 1000 messages Producer ActiveMQQueue[TEST], thread=0 Elapsed time in second : 2 s Producer ActiveMQQueue[TEST], thread=0 Elapsed time in milli second : 2371 milli seconds   Check if messages are on main broker: $ main/bin/artemis queue stat --url tcp://10.0.132.32:61616 Connection brokerURL = tcp://10.0.132.32:61616 |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE | |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST | |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|1 |0 |3045 |0 |3045 |0 |ANYCAST | |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST | |TEST |TEST |0 |1000 |1000 |0 |0 |0 |ANYCAST | |activemq.management.28ccdf7b-2500-482d-a6f9-8cdd42c67afc|activemq.management.28ccdf7b-2500-482d-a6f9-8cdd42c67afc|1 |0 |0 |0 |0 |0 |MULTICAST |   Check if message were replicated to replica broker: $ main/bin/artemis queue stat --url tcp://10.0.134.16:61616 Connection brokerURL = tcp://10.0.134.16:61616 |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE | |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST | |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|0 |0 |0 |0 |0 |0 |ANYCAST | |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST | |TEST |TEST |0 |1000 |1000 |0 |0 |0 |ANYCAST | |activemq.management.06237c3c-ce59-4b89-9dde-8db098724795|activemq.management.06237c3c-ce59-4b89-9dde-8db098724795|1 |0 |0 |0 |0 |0 |MULTICAST |   Consume message from main broker: $ main/bin/artemis consumer --url tcp://10.0.132.32:61616 Connection brokerURL = tcp://10.0.132.32:61616 Consumer:: filter = null Consumer ActiveMQQueue[TEST], thread=0 wait until 1000 messages are consumed Received 1000 Consumer ActiveMQQueue[TEST], thread=0 Consumed: 1000 messages Consumer ActiveMQQueue[TEST], thread=0 Elapsed time in second : 0 s Consumer ActiveMQQueue[TEST], thread=0 Elapsed time in milli second : 122 milli seconds Consumer ActiveMQQueue[TEST], thread=0 Consumed: 1000 messages Consumer ActiveMQQueue[TEST], thread=0 Consumer thread finished   Ensure messages were consumed on main broker and queue were removed: $ main/bin/artemis queue stat --url tcp://10.0.132.32:61616 Connection brokerURL = tcp://10.0.132.32:61616 |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE | |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST | |DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|DRSite9b9d8dbe-70e3-40ea-81dd-fe462b20a8a2|1 |0 |4053 |0 |4053 |0 |ANYCAST | |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST | |activemq.management.b21f9ee1-0632-40ee-b491-0045aaa65d3b|activemq.management.b21f9ee1-0632-40ee-b491-0045aaa65d3b|1 |0 |0 |0 |0 |0 |MULTICAST | Expect to have the queue remains created on replica broker, but it was removed: $ main/bin/artemis queue stat --url tcp://10.0.134.16:61616 Connection brokerURL = tcp://10.0.134.16:61616 |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE | |DLQ |DLQ |0 |0 |0 |0 |0 |0 |ANYCAST | |DRSite2a61bc0e-4610-4e7b-ab32-d70fc3c3c9c6|DRSite2a61bc0e-4610-4e7b-ab32-d70fc3c3c9c6|0 |0 |0 |0 |0 |0 |ANYCAST | |ExpiryQueue |ExpiryQueue |0 |0 |0 |0 |0 |0 |ANYCAST | |activemq.management.ae0a4958-9deb-4825-8fe4-489cf975c5c4|activemq.management.ae0a4958-9deb-4825-8fe4-489cf975c5c4|1 |0 |0 |0 |0 |0 |MULTICAST |  

      In a disaster recovery scenario using mirror option with queue-removal="false" queues on replica broker are getting removed.

       

      The main broker has:

          the auto-creation for queues and addresses are enabled

          the auto-delete for queues and addressed enabled

      The replica broker has:

          the auto-creation for queues and addresses are enabled.

          the auto-delete for queues and addresses are disabled.

       

              tbueno@redhat.com Tiago Bueno
              tbueno@redhat.com Tiago Bueno
              Tiago Bueno Tiago Bueno
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: