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.
I recommend you set the
ackheader on yourSUBSCRIBEframes toclient-individualwhich 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.