You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/07/06 15:37:00 UTC

[jira] [Commented] (QPID-7847) qmf.client.BrokerAgent does not provide reconnect support

    [ https://issues.apache.org/jira/browse/QPID-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16076760#comment-16076760 ] 

ASF subversion and git services commented on QPID-7847:
-------------------------------------------------------

Commit 0ffa89e177346e68bdeb5a24b9f25190c983bd34 in qpid-cpp's branch refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-cpp.git;h=0ffa89e ]

QPID-7847: qmf.client.BrokerAgent does not provide reconnect support

Provided via BrokerAgent.connect(), for example:

    BrokerAgent.connect(self.server.addr, reconnect_delays=ReconnectDelays(.125, 1, True)

After a connection failure this will try to reconnect with the following delays (seconds)
    0, .125, .25, .5, 1, 1, 1, 1 ...

You can use any iterable as the reconnect_delays, ReconnectDelays provides a convenience
to generate an exponential (binary) backoff between two values, followed by a
fixed (or unlimited) repeat of the final value.


> qmf.client.BrokerAgent does not provide reconnect support
> ---------------------------------------------------------
>
>                 Key: QPID-7847
>                 URL: https://issues.apache.org/jira/browse/QPID-7847
>             Project: Qpid
>          Issue Type: Bug
>          Components: QMF
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>
> Moved from PROTON-1511 
> The BrokerAgent is provided by this diff:  https://reviews.apache.org/r/52280/diff/3#0  Here is how to reproduce:
> 1. Instantiate a BrokerAgent connecting to a qpidd broker
> 2. Do something with the connected BrokerAgent object to show that it's working
> 3. kill qpidd with `pkill -9 -f qpidd`
> 4. start qpidd up again
> 5. Try to do step 2 again
> 6. Receive a traceback indicating the BrokerAgent is disconnected
> My code handles reconnect support for the connection, but it's not prepared to also handle reconnect support for the BrokerAgent connection. I would like that connection to have a reconnect support option added so I can call it like:
> BrokerAgent(**existing_options, reconnect=True)
> Having reconnect default to True is also fine w/ me. I think users may still want the option to set it also.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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