Skip to content

Subscription meta events#362

Open
Ethorsen wants to merge 3 commits intovoryx:masterfrom
Ethorsen:subscription_meta_events
Open

Subscription meta events#362
Ethorsen wants to merge 3 commits intovoryx:masterfrom
Ethorsen:subscription_meta_events

Conversation

@Ethorsen
Copy link
Copy Markdown

@Ethorsen Ethorsen commented Jan 10, 2022

Following my question at #361

Added some meta events to the router, from the Subscription Meta API.

Refs:
https://wamp-proto.org/_static/gen/wamp_latest.html#subscription-meta-events
https://crossbar.io/docs/Subscription-Meta-Events-and-Procedures/?highlight=meta#events

Did not add the subscription_meta_api to the broker as this is only a partial implementation of the whole API. It does not include the api Procedures.

Might implement the procedures in a near future.

Usage

$session->subscribe("wamp.metaevent.subscription.on_subscribe", $callbackFn);
$session->subscribe("wamp.metaevent.subscription.on_unsubscribe", $callbackFn);
$session->subscribe("wamp.metaevent.subscription.on_create", $callbackFn);
$session->subscribe("wamp.metaevent.subscription.on_delete", $callbackFn);

$callbackFn will receive $args as first argument
where
$args[0] = session meta information (the session that triggered the event)
$args[1] = subscription meta information [ uri: string, match: string ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant