[zeromq-dev] 0MQ/2.0 - alpha version available

Martin Sustrik sustrik at fastmq.com
Thu Sep 10 12:36:43 CEST 2009


Chad,

> Thanks for your hard work on this release.  What is the best way to 
> implement pub-sub in 0MQ/2.0?

I've implemented a cheap and nasty version of pub/sub message filtering 
(GIT rev. cc165d1). It's slow and allows only for exact matches (no 
wildcards) but it's good enough to demonstrate how the API works.

- Subscription (and unsubscription) is done via setsockopt function.

- Topic is to reside at the beginning of the message in form of single 
byte length followed by the topic itself. So, for example, message "ABC" 
with topic "xyz" is encoded as "\x03xyzABC".

See attached test programs for details.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_pub.cpp
Type: text/x-c++src
Size: 562 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090910/7e64fcc5/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_sub.cpp
Type: text/x-c++src
Size: 462 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090910/7e64fcc5/attachment-0001.cpp>


More information about the zeromq-dev mailing list