Redis PUBLISH – How to publish a message in redis pub/sub
2 months ago Lalit Bhagtani 0
In this tutorial, we will learn about how to publish a message in redis message broker system using redis-cli.
The PUBLISH command is used to publish the message to a specified channel in redis message broker. It returns the number of subscriber that has received the message. The syntax of redis PUBLISH command is as follows :-
redis host:post> PUBLISH <channel> <message>
- (integer) reply, representing the number of subscriber that received the message.
That’s all for how to publish a message in redis message broker using redis-cli. If you liked it, please share your thoughts in comments section and share it with others too.