[zeromq-dev] Message routing in 0MQ

Martin Sustrik sustrik at fastmq.com
Fri Apr 17 17:15:38 CEST 2009


Hi all,

Several of you have showed interest in message routing support in 0MQ.

To move towards meeting these needs, we've written a proof of concept 
implementation of 0MQ routing. The source code can be found here:

http://svn.fastmq.org/svn/zeromq/branches/routing

The change to API consists of a single new function:

void subscribe (int queue, const char *criteria);

By calling this function in receiver application you'll receive only 
messages that contain a size-prefixed string equal to 'criteria' at the 
beginning of the message payload.

Have a look at attached test programs. 'pub' publishes messages of four 
random types. 'sub' allows you to subscribe for a particular type of 
message. You may run several subs at a time each with a different 
subscription.

Still, it'll require a lot of work to get the functionality right and 
make it a production-quality feature. In case you are interested in 
helping with it, have a look here for an overview:

http://www.zeromq.org/whitepapers:routing

and here:

http://www.zeromq.org/whitepapers:message-matching

Any comments, suggestions, patches etc. are welcome.

Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pub.cpp
Type: text/x-c++src
Size: 1316 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090417/e00f9ed9/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sub.cpp
Type: text/x-c++src
Size: 985 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090417/e00f9ed9/attachment-0001.cpp>


More information about the zeromq-dev mailing list