PUBLISH

This page documents the preview (v2.21) version. Preview includes features under active development and is for development and testing only. For production, use the stable (v2024.1) version.

Synopsis

PUBLISH channel message

This command publishes the given message to the specified channel. All subscribers that are subscribed to the specified channel across all the Yugabyte YEDIS API server(s) in the cluster will receive the message.

Return value

Returns, as an integer value, the number of subscribers that the message was forwarded to.

Examples

$ PUBLISH channel message
2

See also

pubsub, subscribe, unsubscribe, psubscribe, punsubscribe