module Redis::Commands::Pubsub
def psubscribe(*channels, &block)
See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/)
Listen for messages published to channels matching the given patterns.
def psubscribe(*channels, &block) _subscription(:psubscribe, 0, channels, block) end
def psubscribe_with_timeout(timeout, *channels, &block)
See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/)
Throw a timeout error if there is no messages for a timeout period.
Listen for messages published to channels matching the given patterns.
def psubscribe_with_timeout(timeout, *channels, &block) _subscription(:psubscribe_with_timeout, timeout, channels, block) end
def publish(channel, message)
def publish(channel, message) send_command([:publish, channel, message]) end
def pubsub(subcommand, *args)
Inspect the state of the Pub/Sub subsystem.
def pubsub(subcommand, *args) send_command([:pubsub, subcommand] + args) end
def punsubscribe(*channels)
See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/)
Stop listening for messages posted to channels matching the given patterns.
def punsubscribe(*channels) _subscription(:punsubscribe, 0, channels, nil) end
def spublish(channel, message)
def spublish(channel, message) send_command([:spublish, channel, message]) end
def ssubscribe(*channels, &block)
def ssubscribe(*channels, &block) _subscription(:ssubscribe, 0, channels, block) end
def ssubscribe_with_timeout(timeout, *channels, &block)
Listen for messages published to the given channels in a shard.
def ssubscribe_with_timeout(timeout, *channels, &block) _subscription(:ssubscribe_with_timeout, timeout, channels, block) end
def subscribe(*channels, &block)
def subscribe(*channels, &block) _subscription(:subscribe, 0, channels, block) end
def subscribe_with_timeout(timeout, *channels, &block)
Listen for messages published to the given channels. Throw a timeout error
def subscribe_with_timeout(timeout, *channels, &block) _subscription(:subscribe_with_timeout, timeout, channels, block) end
def subscribed?
def subscribed? !@subscription_client.nil? end
def sunsubscribe(*channels)
def sunsubscribe(*channels) _subscription(:sunsubscribe, 0, channels, nil) end
def unsubscribe(*channels)
def unsubscribe(*channels) _subscription(:unsubscribe, 0, channels, nil) end