Latest web development tutorials

Redisのコマンドを発行します

Redisのパブリッシュおよびサブスクライブ

Redisのコマンドが指定されたチャネルに情報を送信するために使用される公開します。

文法

Redisのは、次のように基本的なコマンドの構文は次のとおりです公開します:

redis 127.0.0.1:6379> PUBLISH channel message

利用可能なバージョン

> = 2.0.0

戻り値

情報を受信する加入者の数。

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

Redisのパブリッシュおよびサブスクライブ