[zeromq-dev] Where are subscribe filters executed?

Phillip Mienk mienkphi at gmail.com
Mon Feb 16 08:04:57 CET 2015

Made obvious when looking at the pub's send 
method: https://github.com/zeromq/libzmq/blob/master/src/xpub.cpp#L183

On Sunday, February 15, 2015 at 10:58:02 PM UTC-8, Phillip Mienk wrote:
> I'm not positive, however looking at 
> https://github.com/zeromq/libzmq/blob/master/src/xsub.cpp would lead me 
> to believe that the subscription information is being sent to prevent the 
> excess messaging you're describing.
> On Monday, February 2, 2015 at 9:42:53 PM UTC-8, Timothy Perrett wrote:
>> Hi all,
>> Assuming a PUB-SUB socket setup, on the subscribe end if one implements a 
>> filter where is that filter rule enforced? One assumes two possible 
>> implementations:
>> 1. Client side: subscribe client NIC recieves all messages and simply 
>> drops the ones that do not match the filter
>> 2. Server side where during the establishment of the subscribe connection 
>> the client sends its filter rules to the server, and the server only sends 
>> messages over the write that the subscriber cares about.
>> I'm trying to figure out if it makes sense to re-use an existing PUB-SUB 
>> setup or add an additional PUB socket for something, but in this new case I 
>> don't want all of the traffic flowing over the network only to be dropped 
>> on the client side. There's no real problem using a new socket, it just 
>> felt a bit heavy handed and wanted to see what the implementation details 
>> were :-)
>> Cheers, Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150215/9bfbedcb/attachment.htm>

More information about the zeromq-dev mailing list