Version: v2
Topics
Create a topic in PUBSUB_ROOT_DIR/topics which extends Topic and a payload which extends Payload from package.
/pubsub/topics/simple.topic.name.ts
tip
As a convention, the name of the topic file should match the name of the topic name so the file directory becomes self-documenting.
Publishing a message#
If a topic does not exist, it will be created before a message is published.
Example#
client.example.ts
Compression#
Framework supports gzip compression on publish. It can be enabled in Topic options.
With option enabled, message data will compressed before publish to PubSub.