You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Justin Ross <ju...@gmail.com> on 2017/02/10 14:30:35 UTC

Reconnect and amqp:connection:forced

http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-connection-error

"""
connection-forced:
  An operator intervened to close the connection for some reason. The
client could retry at some later date.
"""

Do we interpret this to mean that clients should use their normal reconnect
behavior?

Should it be a matter of configuration?  If so, what should the default be?

Zooming out, would it make sense to eventually introduce in AMQP an
explicit "go away, don't reconnect" variant of connection error?

Re: Reconnect and amqp:connection:forced

Posted by Rob Godfrey <ro...@gmail.com>.
Using a connection error with "resource-deleted" to indicate that the
server itself is no longer available seems like a reasonable interpretation
of the spec.  I'll maybe add that to the work I'm planning to do on
communicating failover / redirect information to clients.

-- Rob

On 10 February 2017 at 15:56, Justin Ross <ju...@gmail.com> wrote:

> On Fri, Feb 10, 2017 at 6:53 AM, Gordon Sim <gs...@redhat.com> wrote:
> >
> >
> >> The one that springs to mind is something that is intentionally removed
> >> from service and definitely will not return.
> >>
> >
> > There are other more specialised error conditions, e.g.
> > amqp:resource-deleted, or maybe amqp:internal-error, that can be used to
> > indicate reconnect may not be of any use.
> >
>
> Ah, that does it.  Thanks.
>

Re: Reconnect and amqp:connection:forced

Posted by Justin Ross <ju...@gmail.com>.
On Fri, Feb 10, 2017 at 6:53 AM, Gordon Sim <gs...@redhat.com> wrote:
>
>
>> The one that springs to mind is something that is intentionally removed
>> from service and definitely will not return.
>>
>
> There are other more specialised error conditions, e.g.
> amqp:resource-deleted, or maybe amqp:internal-error, that can be used to
> indicate reconnect may not be of any use.
>

Ah, that does it.  Thanks.

Re: Reconnect and amqp:connection:forced

Posted by Gordon Sim <gs...@redhat.com>.
On 10/02/17 14:49, Justin Ross wrote:
> On Fri, Feb 10, 2017 at 6:44 AM, Rob Godfrey <ro...@gmail.com>
> wrote:
>
>>> Zooming out, would it make sense to eventually introduce in AMQP an
>>> explicit "go away, don't reconnect" variant of connection error?
>>>
>>
>>
>> What would the use case be?  What would the client do in this case (go hide
>> in a corner / delete itself from the hard disk?).  Potentially we could
>> augment the error with a minimum reconnect delay or something... but other
>> than that I think forced (reconnect according to existing policy) and
>> redirect (you should go somewhere else)... cover all the use cases I can
>> think of.
>>
>
> The one that springs to mind is something that is intentionally removed
> from service and definitely will not return.

There are other more specialised error conditions, e.g. 
amqp:resource-deleted, or maybe amqp:internal-error, that can be used to 
indicate reconnect may not be of any use.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Reconnect and amqp:connection:forced

Posted by Justin Ross <ju...@gmail.com>.
On Fri, Feb 10, 2017 at 6:44 AM, Rob Godfrey <ro...@gmail.com>
wrote:

> > Zooming out, would it make sense to eventually introduce in AMQP an
> > explicit "go away, don't reconnect" variant of connection error?
> >
>
>
> What would the use case be?  What would the client do in this case (go hide
> in a corner / delete itself from the hard disk?).  Potentially we could
> augment the error with a minimum reconnect delay or something... but other
> than that I think forced (reconnect according to existing policy) and
> redirect (you should go somewhere else)... cover all the use cases I can
> think of.
>

The one that springs to mind is something that is intentionally removed
from service and definitely will not return.

Re: Reconnect and amqp:connection:forced

Posted by Rob Godfrey <ro...@gmail.com>.
On 10 February 2017 at 15:30, Justin Ross <ju...@gmail.com> wrote:

> http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-
> transport-v1.0-os.html#type-connection-error
>
> """
> connection-forced:
>   An operator intervened to close the connection for some reason. The
> client could retry at some later date.
> """
>
> Do we interpret this to mean that clients should use their normal reconnect
> behavior?
>
>
To my mind, yes - If you get connection forced the client should use it's
existing configuration (perhaps modified with extra information that it has
previously received from the server about failover hosts - I'll write that
up soon :-) ).


> Should it be a matter of configuration?  If so, what should the default be?
>
>
I don't think that I would consider this case to be any different to simply
having the connection terminate due to a network error.  If the
operator/server wants you to connect to a different server, it should send
a redirect not a forced.



> Zooming out, would it make sense to eventually introduce in AMQP an
> explicit "go away, don't reconnect" variant of connection error?
>


What would the use case be?  What would the client do in this case (go hide
in a corner / delete itself from the hard disk?).  Potentially we could
augment the error with a minimum reconnect delay or something... but other
than that I think forced (reconnect according to existing policy) and
redirect (you should go somewhere else)... cover all the use cases I can
think of.

-- Rob