Message Ordering with Retry and NACK (how does it work)

Robert
Robert Member Posts: 58 ✭✭
edited November 2023 in General Discussions #1

In this page it states that message ordering is guaranteed when using guaranteed delivery:
https://docs.solace.com/Messaging/Guaranteed-Msg/Guaranteed-Messages.htm

I understand that it either would work when:

  • Using exclusive queues
  • Using non exclusive but partioned queues

It would not work:

  • Push Subscription (RDP)
  • Non Exclusive Queues (without partition)

I would like to understand how certain scenarios get handled in such a case ?

  • You send back a NACK for one message ? Would the entire flow be then on hold ?

Answers

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 495 admin

    Hi @Robert. Ordering should be maintained with RDPs, if you change the number of outgoing connections to 1 per REST Consumer.

    Anyhow, I've recently been playing with some JCSMP code, testing message ordering and NACKs, so this is timely. Short answer: yes message ordering can change when doing a settle() with an Outcome of FAILED. The only way it cannot is if you set the queue's "max unacked messages per flow" to 1. Otherwise, there will be other messages pulled down off the queue, and when you NACK one message, the next one will be given to the client application before the NACK goes up to the broker and the message resent back down to the consumer.