Version: v1
Subscriptions
Create a Subscriber to define a message handler for messages that are published on the corresponding topic.
Subscribers are contained in PUBSUB_ROOT_DIR/subscriptions.
tip
Files ending in .sub.js or .sub.ts in PUBSUB_ROOT_DIR/subscriptions will be autoloaded by the subscription server.
Examples#
Typescript subscription example#
/pubsub/subscriptions/simple.topic.name.console-log.sub.ts
Javascript subscription example#
/pubsub/subscriptions/simple.topic.name.sub.js
Subscription example with custom subscriber options#
"/pubsub/subscriptions/simple.topic.name.subscription.js
Subscriber Options#
See full options available in API Docs.