[zeromq-dev] ZeroMQ 2.0 reconnect question

Lobraco, James M james.m.lobraco at baml.com
Mon Dec 14 22:36:31 CET 2009


I am willing to test it. That is not problem. The issue is I don't have
all the potential target environments available for complete testing.
For example, I can test tcp/udp but not PGM. I only have windows target
available to me know, and I don't have MS PGM available. 

What type of testing did you have in mind?


-----Original Message-----
From: Martin Sustrik [mailto:sustrik at 250bpm.com] 
Sent: Monday, December 14, 2009 3:22 PM
To: Lobraco, James M
Cc: zeromq-dev at mail.imatix.com
Subject: Re: [zeromq-dev] ZeroMQ 2.0 reconnect question

Hi James,

Lobraco, James M wrote:
> 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
> 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,
>         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 ();
> }

Yes. You've found the guilty piece of the code :)

Version 2.0 is in alpha, so there are still some pieces unfinished. I
can get the reconnection code into the trunk, but I'll need someone to
test it thoroughly. Would you be willing to help with that?


More information about the zeromq-dev mailing list