TsgcWSPServer_WAMP › Events › OnUnSubscription
Fires when a client sends an UNSUBSCRIBE frame and the broker has removed it from the topic.
property OnUnSubscription: TsgcWSSubscriptionEvent;
// TsgcWSSubscriptionEvent = procedure(Connection: TsgcWSConnection; const Subscription: String) of object
—
Raised after the internal subscriber list for Subscription has been updated to exclude Connection. The client will no longer receive EVENT messages for that topic URI. When a client disconnects without explicitly sending UNSUBSCRIBE, this event is not raised — the broker cleans the subscription up from OnDisconnect. Use this handler for audit logging or to release per-topic resources the application attached to the client.
procedure TForm1.WAMPServerUnSubscription(Connection: TsgcWSConnection;
const Subscription: String);
begin
Memo1.Lines.Add(Format('[%s] left %s', [Connection.Guid, Subscription]));
end;