The order of queues is not being respected between backup and livenode after ServerConsumerImpl.close is called.
ServerConsumerImpl::close will call QueueImpl::cancel for every delivering reference, and the order of the Queues will be different between backup and live node after that operation.
Next time deliveries are replicated they will be in different orders between the two nodes and several issues will happen after that.
You will see exceptions like:
throw new IllegalStateException("Cannot find ref " + messageID +
" in queue " +
As this opertaion will fail:
public void deliverReplicated(final long messageID) throws Exception
MessageReference ref = messageQueue.removeFirstReference(messageID);