[zeromq-dev] [PATCH] Publisher side filtering

Gerard Toonstra gtoonstra at gmail.com
Wed Jan 19 14:08:29 CET 2011

Following patch identifies the issue, but I have doubts about the strategy
to follow with regards to the pipes_attached
boolean and the other pipe that seems to keep hanging around. Wouldn't the
code in this way create a memory leak?
Also, it's probably not a good idea to get rid of the "zmq_assert".  I was
thinking that a better way to solve this may be
the introduction of two boolean variables.. one for "in" direction and other
for "out" pipe attached direction.

This is patched against "sub-forward" branch.

With this fix, the subscriptions are always forwarded upstream, regardless
of which process is terminated.

This strategy allows subscribers to resubmit their subscriptions on a
reconnection, but now that the session has no knowledge
of subscriptions, there are no unsubscribes sent upstream on behalf of a
subscriber when the subscriber goes away. In effect,
the only way to get rid of a subscription is by an explicit unsubscribe.

( i.e... for longer uptimes and temporary topics, it is possible that a
broker starts to receive and send more data than needed )

Not sure if that is deemed important to 0MQ to resolve.


Gerard Toonstra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110119/646d3ad0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-state-bug.-Set-pipes_attached-to-false-when-term.patch
Type: text/x-patch
Size: 1548 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110119/646d3ad0/attachment.bin>

More information about the zeromq-dev mailing list