Description
Sometimes the exception occurs once the connection to the broker is broken. Sometimes the reconnect is done, but with the producer is slow and the consumer receives old messages after sending a new only.
I found the mistake causing that:
In class Apache.NMS.Stomp.Session method ClearMessagesInProgress is a type-mismatch.
foreach(MessageConsumer consumer in this.consumers)
But consumers is a dictionary, so it should be:
foreach(MessageConsumer consumer in this.consumers.Values)
Once this line is changed, failover works fine even with ssl.