[jira] [Created] (QPID-3975) queue state replication in inconsistent state after source broker restart
Pavel Moravec created QPID-3975:
Summary: queue state replication in inconsistent state after source broker restart
URL: https://issues.apache.org/jira/browse/QPID-3975 Project: Qpid
Issue Type: Bug
Components: C++ Broker
Affects Versions: 0.14
Reporter: Pavel Moravec
Description of problem:
Queue state replication adds qpid.replication.seqno into messages sent to
replication exchange. The counter is reset during every broker (re)start. This
causes message loss / inconsistent contents of replicated queues on src. and
dst.brokers after src.broker restart.
Version-Release number of selected component (if applicable):
any (incl. 0.14)
Steps to Reproduce:
1. Setup queue state replication, like
2. Produce 10 messages to the queue-a on the source broker.
3. Restart source broker.
4. a) Produce another 5 messages to the queue-a on the source broker.
4. b) (alternative to 4a): Consume few messages from the queue-a.
In both cases, 4a) and also 4b), destination broker does not update its queue-a
by new message enqueues / dequeues.
Dst.broker to update queue-a by either enqueues (4a) or dequeues (4b).
together with source broker restart, do restart also destination broker (or at least delete and re-create replication exchange there). That will reset seqno on the replication exchange.
The only fix I see possible is to storing qpid.replication.seqno when shutting
down a broker and reading it during broker startup.
When running source brokers in a cluster, qpid.replication.seqno read during
the startup would have to be replaced by its current value from a clustered peer (if
there was some activity on the replication-queue when the broker was down).