[zeromq-dev] messaging bus on Java, polling and interrupting threads

Michael Kogan mkogan at semanticresearch.com
Wed Feb 16 19:35:15 CET 2011


Thank you.
I hope I am not missing some sort of a technique of using a poller to poll multiple sub sockets. Essentially, all I am doing is shuffling messages from the bus to WebSockets, and to do that, I currently have a thread pre subscriber (i.e. open WebSocket).

Mike.

On Feb 16, 2011, at 8:04 AM, Martin Sustrik wrote:

> On 02/16/2011 03:28 PM, Ian Barber wrote:
> 
>> I would imagine that you could do something like add another zeromq
>> socket for control messages, and poll for them both - then have a
>> separate thread that will catch the interruption and send a shutdown
>> type message (or whatever you want it to do) to your subs.
> 
> Alternatively, if the problem is cleaning up, you may simply close the 
> context and all sockets should immediately return with ETERM error.
> 
> 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