You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Stephen Baker <st...@rmssoftwareinc.com> on 2022/03/22 13:40:30 UTC

Removing a mirror

In our production system we switched from the one directional mirroring to dual mirroring as supported by Artemis 2.20+. At the same time we renamed the mirror to have distinct names on both datacenters (BOS and SJE), previously the mirrors were simply called mirror on both sides.

We did that by replacing the amqp-connection in the broker.xml with the following sed commands, and restarting the broker.
  sed -i '' -e 's|<amqp-connection.*|<amqp-connection uri="\${raveMirrorConnectionStr}" name="\${raveMirrorName}" user="\${raveMirrorUser}" password="\${raveMirrorPassword}">|' broker.xml
  sed -i '' -e 's|<mirror .*/>|<mirror/>|' broker.xml
  sed -i '' -e 's|autoStart=\${ravePrimarySite};*||ig' broker.xml

What I noticed on restarting the broker was that the old mirror queues still existed and were still being populated, so I deleted those queues and addresses from the management console, resulting in a series of errors like:

  2022-03-16 23:52:29,482 WARN [org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget] Queue $ACTIVEMQ_ARTEMIS_MIRROR_Mirror not found on mirror target, ignoring ack for queue=$ACTIVEMQ_ARTEMIS_MIRROR_Mirror, messageID=63165878649, nodeID=dea32b83-efd5-11eb-b5b1-0050568fe3b2

Since then I've been wondering if I did the right thing, or if there is some hidden queuing still going on for the old mirror. I'm seeing lots of issues with queue counts being out of sync that I don't know how to diagnose or resolve; and during our failover test we ended up needing to restart Artemis because messages were not being consumed. I don't know if any of these things are related.

Stephen E. Baker