You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@inlong.apache.org by GitBox <gi...@apache.org> on 2021/07/28 11:37:27 UTC

[GitHub] [incubator-inlong] dockerzhang opened a new issue #831: [INLONG-232] TubeBroker#register2Master, reconnect and wait

dockerzhang opened a new issue #831:
URL: https://github.com/apache/incubator-inlong/issues/831


   <p>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</p>
   <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
   <pre class="code-java">
   <span class="code-keyword">for</span> (<span class="code-object">int</span> i; i < reconnectionTimes; i++) {
       <span class="code-keyword">try</span> {
   tryConnect();
       } <span class="code-keyword">catch</span> (Throwable e) {
   <span class="code-keyword">try</span> {
       TimeUnit.MILLISECONDS.sleep(200);
   } <span class="code-keyword">catch</span> (InterruptedException ignored) {
       <span class="code-comment">//ignore interrupted
   </span>}
       }
   }</pre>
   </div></div>
   <i>JIRA link - <a href="https://issues.apache.org/jira/browse/INLONG-232">[INLONG-232]</a> created by viviel</i>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-inlong] dockerzhang closed issue #831: [INLONG-232] TubeBroker#register2Master, reconnect and wait

Posted by GitBox <gi...@apache.org>.
dockerzhang closed issue #831:
URL: https://github.com/apache/incubator-inlong/issues/831


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org