You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tubemq.apache.org by "Guangxu Cheng (Jira)" <ji...@apache.org> on 2020/06/11 11:57:00 UTC

[jira] [Resolved] (TUBEMQ-232) TubeBroker#register2Master, reconnect and wait

     [ https://issues.apache.org/jira/browse/TUBEMQ-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guangxu Cheng resolved TUBEMQ-232.
----------------------------------
    Fix Version/s: 0.5.0
       Resolution: Fixed

Merged. Thanks for your contributing [~viviel]

> TubeBroker#register2Master, reconnect and wait
> ----------------------------------------------
>
>                 Key: TUBEMQ-232
>                 URL: https://issues.apache.org/jira/browse/TUBEMQ-232
>             Project: Apache TubeMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: viviel
>            Assignee: viviel
>            Priority: Low
>              Labels: pull-request-available
>             Fix For: 0.5.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> If the broker fails to register with the master, a total of 5 reconnections will be attempted. But I think we should pause the thread for a period of time every time the connection fails to be reconnected
> {code:java}
> for (int i; i < reconnectionTimes; i++) {
>     try {
>         tryConnect();
>     } catch (Throwable e) {
>         try {
>             TimeUnit.MILLISECONDS.sleep(200);
>         } catch (InterruptedException ignored) {
>             //ignore interrupted
>         }
>     }
> }{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)