Pub/Sub

Publish and subscribe: messages on channels, pattern subscriptions, and shard channels for clusters.

18 commands in KiviDB 1.1.2. Every command.

  • PING: Checks that the server answers.
  • PSUBSCRIBE: Subscribes this connection to every channel matching a glob-style pattern.
  • PUBLISH: Sends message to every client subscribed to channel, with SUBSCRIBE, or to a pattern that matches it, with PSUBSCRIBE.
  • PUBSUB: Reports on the channels and patterns clients are subscribed to.
    • PUBSUB CHANNELS: Returns the channels with at least one subscriber, or those matching a glob-style pattern.
    • PUBSUB HELP: Lists the PUBSUB subcommands and what each does.
    • PUBSUB NUMPAT: Returns how many pattern subscriptions there are, from all clients together.
    • PUBSUB NUMSUB: Returns how many clients are subscribed to each of the given channels, not counting pattern subscriptions.
    • PUBSUB SHARDCHANNELS: Returns the shard channels with at least one subscriber, or those matching a glob-style pattern.
    • PUBSUB SHARDNUMSUB: Returns how many clients are subscribed to each of the given shard channels.
  • PUNSUBSCRIBE: Unsubscribes this connection from patterns, or from all of them if none is given.
  • QUIT: Asks the server to close the connection, after replying OK.
  • RESET: Puts the connection back as it was when it was opened: unsubscribed from everything, out of any transaction and with no keys watched, on database 0, speaking RESP2, with no name and no client-side ca…
  • SPUBLISH: Sends message to the clients subscribed to the shard channel shardchannel with SSUBSCRIBE.
  • SSUBSCRIBE: Subscribes this connection to shard channels.
  • SUBSCRIBE: Subscribes this connection to channels.
  • SUNSUBSCRIBE: Unsubscribes this connection from shard channels, or from all of them if none is given.
  • UNSUBSCRIBE: Unsubscribes this connection from channels, or from all of them if none is given.