Format example code in 'Publishing (Sending Messages)' section of ref doc.
Closed #2533
This commit is contained in:
@@ -22,7 +22,9 @@ To publish a message, you can use, as with the other operations, either the low-
|
|||||||
// send message through connection RedisConnection con = ...
|
// send message through connection RedisConnection con = ...
|
||||||
byte[] msg = ...
|
byte[] msg = ...
|
||||||
byte[] channel = ...
|
byte[] channel = ...
|
||||||
con.publish(msg, channel); // send message through RedisTemplate
|
con.publish(msg, channel);
|
||||||
|
|
||||||
|
// send message through RedisTemplate
|
||||||
RedisTemplate template = ...
|
RedisTemplate template = ...
|
||||||
Long numberOfClients = template.convertAndSend("hello!", "world");
|
Long numberOfClients = template.convertAndSend("hello!", "world");
|
||||||
----
|
----
|
||||||
|
|||||||
Reference in New Issue
Block a user