Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZMQ_XPUB_VERBOSE backward compatibility broken in 4.2 #2820

Closed
kikosha opened this issue Nov 5, 2017 · 2 comments
Closed

ZMQ_XPUB_VERBOSE backward compatibility broken in 4.2 #2820

kikosha opened this issue Nov 5, 2017 · 2 comments

Comments

@kikosha
Copy link

kikosha commented Nov 5, 2017

In zmq_setsockopts API v4.1 it says:

ZMQ_XPUB_VERBOSE: provide all subscription messages on XPUB sockets
Sets the XPUB socket behavior on new subscriptions and unsubscriptions. A value of 0 is the default and passes only new subscription messages to upstream. A value of 1 passes all subscription messages upstream.

In zmq_setsockopts API v4.2 it says:

ZMQ_XPUB_VERBOSE: pass subscribe messages on XPUB socket
Sets the XPUB socket behaviour on new subscriptions. If enabled, the socket passes all subscribe messages to the caller. If disabled, these are not visible to the caller. The default is 0 (disabled).

Obviously, this breaks the backward compatibility

@bluca
Copy link
Member

bluca commented Nov 5, 2017

Hi,

The old documentation for the option was misleading and was changed in #1786 . That option does not affect the passing of new subscriptions - that always happened, as it's the reason of the existence of XPUB vs a simple PUB.

As you can see in the code new subs are always passed:

https://github.com/zeromq/libzmq/blob/master/src/xpub.cpp#L122

if (options.type == ZMQ_XPUB && (unique || (*data == 1 && verbose_subs) ||
      (*data == 0 && verbose_unsubs && verbose_subs))) {

If you find the new wording to be confusing as well, please feel free to send a PR to amend it and make it clearer. Meanwhile, given there is no backward incompatibility I'll close this issue to avoid confusion.

@bluca bluca closed this as completed Nov 5, 2017
@bluca
Copy link
Member

bluca commented Feb 25, 2018

Upon further review, there is space for improving the current docs. Will push changes soon that will clarify that these options only affect duplicates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants