axon icon indicating copy to clipboard operation
axon copied to clipboard

pub-end filtering

Open tj opened this issue 13 years ago • 3 comments

for subscriptions. back when we were going the router/dealer route propagation would have been a bit more annoying but now that we would just relay with pub/sub all the way through this should be trivial

tj avatar Oct 28 '12 20:10 tj

Interesting request today at work, wanted to jot it down before I forget... Wanted a nice way to know how many peers where listening to a given topic in pub/sub, obviously not possible with the current sub-end filtering, but something to keep in mind whenever we get around to this.

gjohnson avatar Jan 04 '13 20:01 gjohnson

Yeah, this is the way Redis pub/sub filtering works -- and it tries to address the 'how many peers listening to a topic' by returning the number of subscribers who got the message when you publish. The problem is if you're publishing to a middle-man who re-broadcasts (say Master-Slave replication in terms of Redis) you can't ever really know how many actual listeners there were, at least not trivially.

My guess is in pretty much every case if you need read receipts you're probably better just adding a separate publish channel from the workers, which really should be up to the implementation as opposed to the library.

brycebaril avatar Jan 12 '13 23:01 brycebaril

we could propagate the subscribers upstream reasonably easily but I totally agree, in most cases, especially performance-critical cases you would likely have a dedicated socket anyway. I can see that being troublesome when N topics is a really large N but for myself at least that's never the case

tj avatar Jan 12 '13 23:01 tj