[zeromq-dev] Publisher side filtering
Martin Sustrik
sustrik at 250bpm.com
Sat Jan 15 13:07:45 CET 2011
Hi all,
I've applied the publisher-side-filtering-related patches to the
sub-forward branch on github:
https://github.com/zeromq/zeromq2/tree/sub-forward
The subscriptions are forwarded up the distribution tree till they reach
the ultimate publisher. The publisher does nothing with the subscription
at the moment, it just prints out a message about getting the
subscription. The next step will be to start actually filtering the
messages.
Anyway. Those of you who want to help with the ongoing work, please to
try to use the branch and check out whether subscriptions are correctly
distributed to publishers in different topologies, when re-connections
happen, when individual nodes fail and are restarted etc.
I'm attaching a simple publisher-device-subscriber test, that seems to work.
Note: Subscription forwarding works a bit different when compared to
classic broker-style messaging. When there's a forwarder device in the
middle (broker) with many publishers and subscribers connected
(clients), the subscriptions are forwarded all the way up to the
publishers. That's different from standard model when the subscription
is sent to the broker and the filtering goes on there.
In other words, with standard model, if message that nobody wants is
sent, it goes to the broker, where it is dropped. With 0mq subscription
forwarding the message is dropped immediately on the publisher and
doesn't cross the network at all.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 1310 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110115/d14f1a77/attachment.cpp>
More information about the zeromq-dev
mailing list