0

Given that

 SessionLockLostException and MessageLockLostException are expected exceptions and the user is expected to handle those scenarios irrespective of whether there is a subscription update happening or not.
The lock is in-memory and can be lost when nodes restart, or when containers move due to load-balancing or if there are any transient communication issues.

What is the recommended way of handling those exceptions given we do not want to loose the messages?

Scooby
  • 635
  • 3
  • 9
  • 21

1 Answers1

0

Messages are not lost when using PeekLock receive mode. Unless the mode is changed to ReceiveAndDelete. By default, operations should be to retry the message. When the lock or session lock is lost, the message will be delivered next time. This does mean building your processor in a way that allows idempotent processing.

Sean Feldman
  • 23,443
  • 7
  • 55
  • 80