ActiveMQ Artemis STOMP NACK incompatible

60 Views Asked by At

I am using ActiveMQ Artemis 2.31.2 and the STOMP protocol. I want to have messages redelivered or placed on a DLQ, but the source code of ActiveMQ Artemis shows:

@Override
public StompFrame onNack(StompFrame request) {
   //this eventually means discard the message (it never be redelivered again).
   //we can consider supporting redeliver to a different sub.
   return onAck(request);
}

What solution would be an alternative to NACK? I searched and viewed the official source code.

1

There are 1 best solutions below

2
Justin Bertram On

I recommend you set the ack header on your SUBSCRIBE frames to client-individual which means you can acknowledge any message you like and then when you close your connection any messages which you didn't acknowledge will be placed back on the queue for delivery to other consumers.