English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Publish Command

Redis Publish/Subscribe

The Redis Publish command is used to send information to the specified channel.

Syntax

Basic Syntax of redis Publish Command:

redis 127.0.0.1:6379> PUBLISH channel message

Available Version

>= 2.0.0

Return Value

Number of subscribers receiving the message.

Online Examples

redis 127.0.0.1:6379> PUBLISH mychannel "hello, i m here"
(integer) 1

Redis Publish/Subscribe