On 20 January 2016 at 12:11, Gordon Sim <[email protected]> wrote: > On 01/20/2016 10:48 AM, Rob Godfrey wrote: > >> What I get from this is that the C++ client gives up retrying when it gets >> a 320 (connection forced) reply from the broker. >> > > Indeed, the retry gives up when it gets an explicit close rather than the > socket failing. > > As Keith mentioned earlier, the error message is basically saying "Yes, the >> broker is up... but it isn't fully configured yet", and the 320 error code >> (as defined by the AMQP 0-10 spec) says "The client may retry at some >> later >> date."... so if the C++ client would continue retrying on receipt of this >> error then you would establish a connection. I guess this would require a >> C++ client change, but Gordon would be the one to know here... >> > > As 0-10 did not define a code for authentication failure, 320 has been > used for that. It is a rather broad definition 'An operator intervened to > close the connection for some reason'. Since it would not always be > desired/appropriate to retry on receiving an explicit code, any change > would need to be configurable. > > Is there a reason the broker wants to accept connections before it is > fully configured for use?
There is no single point where "it is fully configured for use" in the case of HA a virtual host may transition from a REPLICA state to a MASTER state (or vice versa) at any time, similarly virtual hosts may be stopped and started by management actions. The broker architecture separates the ports (which accept incoming connections) from the virtual hosts... until the virtual host is chosen, the broker cannot know whether it can service the request. As you say, it is unfortunate that we don't have alternative error codes for auth failure and other transient connection issues... but not much we can do there. Would it be possible to add some way to have the client keep retrying even if it gets a 320? -- Rob > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
