[zeromq-dev] pausing polling sockets
Michael Kogan
mkogan at semanticresearch.com
Wed Jan 26 21:57:04 CET 2011
Hi all,
I have prototyped a messaging bus using Jetty WebSockets or Flash Sockets to allow browsers to participate in the pub/sub messaging.
I have 2 forwarders per jetty instance (one inproc -> inproc and one inproc->tcp with the inproc->inproc also connecting to other server's tcp connection).
Each web socket connection gets a pub and a sub sockets, with a sub socket having a poller on a thread.
The prototype works very well and very fast, however, I am concerned about missing messages on disconnect. A disconnect can have several reasons:
1. Client Error/ Fault - client has to reload state.
2. Server Fault/Crash - client has to reload state from another server.
3. Network disconnect - client can reload state but it would be nice for the client to reconnect to the same machine and resume where it left off.
What happens if I stop the thread that is doing the polling on on the sub socket? If I resume it when the client reconnects will I get the messages that socket was subscribed for that were sent during the period the socket was not polled?
Thanks,
Mike.
PS:
should I expect to be able to open a tcp socket using a name? (binding to tcp://localhost:8180 does not work - tcp://127.0.0.1:8180 does).
More information about the zeromq-dev
mailing list