Hello,

I have some questions about mirroring via AMQP broker connection and ways
to adjust its configuration in case of bad network conditions.

For context, I'm building an Artemis topology across two datacenters.
It is composed of two clusters (one on each datacenter) in replica mode
(primary/backup pairs) relying on external quorum.
Symmetric federation is enabled so that messages can be exchanged between
both data centers.

On top of that configuration, I'm now thinking about disaster recovery for
the following requirements:

Req 1 - Store a copy of messages in the other datacenter so that in case of
a disaster no messages are lost.
The Artemis sync mirroring feature covers this requirement as the client is
blocked until the mirror ack the message.

Req 2 - Reduced impact on message throughput in case of network
instabilities:
As clients are blocked with mirror sync, the message processing throughput
is directly impacted by network instabilities (like latency issues),
clients can be entirely blocked (and will timeout) if the target mirror
broker is unreachable.

As blocking a client for too long is not acceptable for my use case, I'm
trying to understand if there is a way to adjust mirroring configuration
when network instabilities arise.
I have thought about a few options that could help to cope with network
issues and that would allow client applications to continue using the
broker at the cost of temporarily reducing message mirroring guarantees.

Option 1 - Sync mirroring mode + switch to async when network is unstable
It would be the best of both methods, although, messages would be
temporarily at risk when in async mode.
For now, I have found no way to switch from sync to async dynamically via
the administration console, so I have some doubt it could be achieved. I'm
not sure if it is something feasible via JMX calls or a custom plugin.
A broker restart is possible to switch modes but it would close all client
connections and that is not something possible in my case.

Option 2 - Sync mirroring  mode + stop the broker connection when network
is unstable
It allows client applications to use the broker but will stop message
mirroring, messages are at risk until the broker connection is restarted.
I have tried to test it and have stopped the broker connection via the
admin console, but client applications are still stuck and cannot
consume/produce messages.
I don't know if it is normal behaviour or not, does someone have some
insight about it ?

Option 3 - Use async mirroring
Not impacted by networking issues but at risk of losing some messages in
case of disaster.

I would be more than happy to know your opinion on the above options, if
you have other ideas feel free to let me know.

Many thanks

J-P

Reply via email to