TsgcWSPServer_sgc › Events › OnAcknowledgment
Fires when a client confirms receipt of a QoS Level 1 or Level 2 message.
property OnAcknowledgment: TsgcWSAcknowledgment;
// TsgcWSAcknowledgment = procedure(Connection: TsgcWSConnection; const Id: string) of object
—
Only raised when QoS is set to Level 1 or Level 2. The Id argument matches the Id of the original outgoing message, allowing the server to correlate the acknowledgment with its pending list. Before the event fires the server has already removed the message from the resend queue, so the handler is purely informational (logging, metrics or application-level bookkeeping).
procedure TForm1.oProtocolAcknowledgment(Connection: TsgcWSConnection; const Id: string);
begin
Memo1.Lines.Add(Format('ack from %s for %s', [Connection.Guid, Id]));
end;