TsgcWSPClient_WAMPMethods › Subscribe

Subscribe Method

Registers interest in a PubSub topic so that matching events are delivered to the OnEvent handler.

Syntax

procedure Subscribe(const aTopicURI: String);

Parameters

NameTypeDescription
aTopicURIconst StringFully-qualified URI of the topic, or a prefix:name CURIE previously registered with Prefix. Matching is literal — WAMP v1 does not support wildcards.

Remarks

Sends a WAMP v1 SUBSCRIBE frame (type id 5). The server silently accepts the subscription; no acknowledgement event is raised. From that moment on, any PUBLISH whose topic matches aTopicURI fires OnEvent on this client. Subscriptions last until the session ends or UnSubscribe is called; they do not survive reconnects, so re-subscribe from OnWelcome when a new session is established.

Example


WAMP.Subscribe('http://example.com/chat#lobby');

Back to Methods