TsgcWSPClient_AMQP1 › Events › OnAMQPMessageSentAck
Fires when the peer returns the Disposition frame that settles a previously sent message, reporting its terminal delivery state.
property OnAMQPMessageSentAck: TsgcAMQP1MessageSentAckEvent;
// TsgcAMQP1MessageSentAckEvent = procedure(Sender: TObject; const aSession: TsgcAMQP1Session; const aLink: TsgcAMQP1SenderLink; const aMessageId: string; const aDeliveryState: TsgcAMQP1FrameDeliveryStates; const aDisposition: TsgcAMQP1FrameDisposition) of object
—
Raised when a disposition performative arrives from the broker for an earlier Transfer on a sender link. aDeliveryState is the terminal outcome the broker chose — Accepted, Rejected (with an error the application should log), Released or Modified — and aDisposition carries the raw delivery-id range it applies to, the Settled flag and the First / Last ids. For at-least-once reliability the application should treat a send as durable only after receiving this event with Accepted. Correlate via aMessageId with the earlier OnAMQPMessageSent.
procedure TForm1.oAMQP1AMQPMessageSentAck(Sender: TObject;
const aSession: TsgcAMQP1Session; const aLink: TsgcAMQP1SenderLink;
const aMessageId: string;
const aDeliveryState: TsgcAMQP1FrameDeliveryStates;
const aDisposition: TsgcAMQP1FrameDisposition);
begin
DoLog(Format('#AMQP1 ack id=%s state=%d',
[aMessageId, Ord(aDeliveryState)]));
end;