TsgcWSPClient_AMQPMethods › AckMessage

AckMessage Method

Acknowledges receipt of one or more delivered messages (basic.ack).

Syntax

procedure AckMessage(const aChannel: string; aDeliveryTag: UInt64; aMultiple: Boolean = false);

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel that delivered the message.
aDeliveryTagUInt64Server-assigned delivery tag identifying the message (received via OnAMQPBasicDeliver).
aMultipleBooleanWhen True, acknowledges all messages up to and including aDeliveryTag; when False, only the single message is acknowledged.

Remarks

AckMessage is only required when the consumer was registered with no-ack set to False. The broker will redeliver any message for which no acknowledgement is received before the channel or connection closes.

Example

procedure TForm1.sgcWSPClient_AMQP1AMQPBasicDeliver(Sender: TObject;
  const aChannel, aConsumerTag: string; aDeliveryTag: UInt64;
  aRedelivered: Boolean; const aExchange, aRoutingKey: string);
begin
  sgcWSPClient_AMQP1.AckMessage(aChannel, aDeliveryTag);
end;

Back to Methods