[zeromq-dev] ZeroMQ 2.0 reconnect question
Lobraco, James M
james.m.lobraco at baml.com
Mon Dec 14 22:11:55 CET 2009
I created a two simple pub/sub applications using 2.0. Everything works
fine, however, if I shut the publisher down, then start it back up, the
original subscriber does not reconnect with the new publisher. I tried
setting the identity option on the socket with on the publisher with no
luck.
I did notice in zmq_connector_init.cpp the following comment in detch().
Is this just not supported in 2.0 yet?
void zmq::zmq_connecter_init_t::detach ()
{ // TODO: Start reconnection process here.
/*
// Create a connecter object to attempt reconnect. Ask it to wait
for a
// while before reconnecting.
io_thread_t *io_thread = choose_io_thread (options.affinity);
zmq_connecter_t *connecter = new zmq_connecter_t (io_thread, owner,
options, session_name.c_str (), true);
connecter->set_address (...);
zmq_assert (connecter);
send_plug (connecter);
send_own (owner, connecter);
*/
// This function is called by engine when disconnection occurs.
// The engine will destroy itself, so we just drop the pointer here
and
// start termination of the init object.
engine = NULL;
term ();
}
More information about the zeromq-dev
mailing list