TsgcWSPClient_STOMP_ActiveMQ › Methods › NACK
Sends a NACK frame telling the server the message was not consumed.
procedure NACK(const aId: string; const aTransaction: String = '');
| Name | Type | Description |
|---|---|---|
aId | const string | Value of the ack header (STOMP 1.2) or message-id (STOMP 1.1) received in the MESSAGE frame being rejected. |
aTransaction | const String | Optional transaction id; when set the NACK participates in an ongoing transaction and only takes effect on COMMIT. |
NACK is the opposite of ACK: it informs the ActiveMQ broker the message could not be processed so it can redeliver or dead-letter it. Only valid on subscriptions opened with ackClient or ackClientIndividual. Broker-specific behaviour (redelivery count, DLQ routing) depends on the ActiveMQ server configuration. When aTransaction is supplied the NACK is deferred until CommitTransaction.
oActiveMQ.NACK(aMessage.Ack);