TsgcWSPClient_AMQP1Events › OnAMQPMessageSent

OnAMQPMessageSent Event

Fires after the last Transfer frame of a message has been written to the transport on a sender link.

Syntax

property OnAMQPMessageSent: TsgcAMQP1MessageSentEvent;
// TsgcAMQP1MessageSentEvent = procedure(Sender: TObject; const aSession: TsgcAMQP1Session; const aLink: TsgcAMQP1SenderLink; const aMessageId: string) of object

Default Value

Remarks

Raised as soon as the outbound Transfer frames for a message have been pushed onto the socket. This is a local "sent to network" notification: the broker may not have processed it yet, and the delivery is still unsettled unless the sender settle-mode was pre-settled. Wait for OnAMQPMessageSentAck to learn the terminal outcome (Accepted / Rejected / Released / Modified). aMessageId is the message-id from the message Properties section (or an empty string when the message had none), useful to correlate with the later disposition.

Example

procedure TForm1.oAMQP1AMQPMessageSent(Sender: TObject;
  const aSession: TsgcAMQP1Session; const aLink: TsgcAMQP1SenderLink;
  const aMessageId: string);
begin
  DoLog('#AMQP1 sent id=' + aMessageId);
end;

Back to Events