TsgcWSPClient_STOMP_ActiveMQ › Methods › ACK
Sends an ACK frame acknowledging the successful consumption of a message.
procedure ACK(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 acknowledged. |
aTransaction | const String | Optional transaction id; when set the ACK participates in an ongoing transaction and only takes effect on COMMIT. |
Only required when the subscription was opened with ackClient or ackClientIndividual. In ackClient mode the ACK is cumulative and also acknowledges every prior unacked message on the same subscription; in ackClientIndividual mode only the referenced message is acknowledged. When aTransaction is supplied the ACK is buffered and released when CommitTransaction is called.
procedure TForm1.oActiveMQMessage(Sender: TObject; aConnection: TsgcWSConnection; const aMessage: TsgcSTOMPMessage);
begin
oActiveMQ.ACK(aMessage.Ack);
end;