[zeromq-dev] XPUB/XSUB subscriptions and protocol differences between 3.0 and 3.1
Julien Kauffmann
julien.kauffmann at freelan.org
Wed Jun 1 14:46:40 CEST 2016
Hi,
I've been working on a Python asyncio-native implementation of ZMTP
during the past weeks. So far everything is going great, but as I wrote
interoperability tests with pyzmq, I stumbled on a question for which I
couldn't find an answer in the various RFCs/documentations.
I've implemented ZMTP 3.1 (http://rfc.zeromq.org/spec:37/) and wish to
also support 3.0 (http://rfc.zeromq.org/spec:23/ZMTP/).
From what I understand, the main (only ?) difference in the 3.1 version
is the addition of the PING/PONG, SUBSCRIBE/UNSUBSCRIBE commands and
endpoint resources.
The SUBSCRIBE/UNSUBSCRIBE part is where I think lies an ambiguity. ZMTP
3.1 removed from the protocol specification the subscription messages in
that format:
|subscribe = %x00 short-size %d1 subscription|
And replaced those with:
|subscribe = command-size %d9 "SUBSCRIBE" subscription |
The new RFC makes no reference to the old format whatsoever and so I
assume this is because this "old" format is no longer supported in ZMTP
3.1. Put otherwise, the new RFC dictates the use of commands instead of
messages and from my understanding, commands are not visible to the
application.
This is fine, except the PUBSUB RFC (http://rfc.zeromq.org/spec:29/), in
the XSUB/XPUB section does not describe what kind of subscription frame
is expected from/to be sent to the application. And since the new
protocol uses commands and not frames anymore, there is no obvious way
to pass those to/retrieve those from the application layer.
My questions are :
- Should an implementation for ZMTP 3.1 still support the "old"
subscription format ? I'm asking in the case where the remote peer
claims it uses 3.1 as well.
- Should an implementation for ZMTP 3.1 convert subscription commands
to/from the "old" subscription format in XPUB/XSUB messages ? Is this
documented anywhere ?
Thanks !
Julien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160601/7e67cec0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4269 bytes
Desc: Signature cryptographique S/MIME
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160601/7e67cec0/attachment.bin>
More information about the zeromq-dev
mailing list