liubiao4123 / servicestack

Automatically exported from code.google.com/p/servicestack
0 stars 0 forks source link

ServiceStack.Redis PublishMessage does not return number of receivers #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Redis PUBLISH command will return number of receivers-subscribers. In 
ServiceStack.Redis (commands Publish, PublishMessage) no number of receivers is 
returned.

void PublishMessage(string toChannel, string message); 
should be:
int PublishMessage(string toChannel, string message);

What is the expected output? What do you see instead?
More details on the PUBLISH command (from 
http://code.google.com/p/redis/wiki/PublishSubscribe)

The Publish command is a bulk command where the first argument is the target 
class, and the second argument the data to send. It returns an Integer Reply 
representing the number of clients that received the message (that is, the 
number of clients that were listening for this class).

What version of the product are you using? On what operating system?
svn checkout 21.11.2010

Please provide any additional information below.
Above feature is necessary in examples, where we publish message and start a 
counter (opencases) (redis.IncrBy) with number of recipients. Counter gets 
decremented on every reply received... When opencases=0 we must start following 
actions.

Original issue reported on code.google.com by logar.da...@gmail.com on 21 Nov 2010 at 1:51

GoogleCodeExporter commented 8 years ago
Yep makes sense.

I've added the expected return value in the latest build attached.
Let me know if it works as expected.

- Demis

Original comment by demis.be...@gmail.com on 21 Nov 2010 at 4:32

Attachments:

GoogleCodeExporter commented 8 years ago
Works as expected.

thx
Damir

Original comment by logar.da...@gmail.com on 22 Nov 2010 at 10:48

GoogleCodeExporter commented 8 years ago
Sweet, closing.

Original comment by demis.be...@gmail.com on 22 Nov 2010 at 1:50