[zeromq-dev] Subscribing in JAVA api

Chris Wong chris at chriswongstudio.com
Tue May 11 23:35:51 CEST 2010


I think Robin meant that the subscriber wants to subscribe to messages of topic "animals.mammals" and not receiving message of topic "animals.mammals.cats"

In C, we'd call setsockopt with "animals.mammals\0".  What's the Java way of doing that?


On May 11, 2010, at 2:11 PM, Martin Sustrik wrote:

> Hi Robin,
>> One oddity I noticed... can java code subscribe using a precise match e.g. in c you hand a null terminated string as the topic to setsockopt. In java I guess the equivalent would be a string ending with "\u0000"?
> The matching is done on the beginning of the message and that's it.
> Thus you can use any character that doesn't appear in the topic as a 
> boundary between topic and actual data. I myself often use pipe sign, 
> e.g "animals.mammals.cats|kitty".
>> Also what are the plans for PGM on windows? Read a few posts and it seems its not ready yet for general consumption yet. Are there instructions if we want to try to build it ourselves? Any ETA on a binary package?
> Others may have more info about this...
> Cheers.
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list