NetClientOptions ops = new NetClientOptions();
ops.setReconnectInterval(TimeUnit.SECONDS.toMillis(5))
.setReconnectAttempts(100);
client = vertx.createNetClient(ops);
connect();
vertx.setTimer(5000, handler -> {
System.out.println("ReConnect Timer Fired");
connect();
});
Tim Fox | 11/21/14 |
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/6123a510-662f-4410-8738-b0a5b9fb860d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 19 Jan 2018, at 16:52, murtuza chhil <chi...@gmail.com> wrote:
This probably answers it....https://groups.google.com/d/msg/vertx/QuJn4ZmUaw0/TMEKiRMjH5AJ
Tim Fox <Auto Generated Inline Image 1.png>11/21/14
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/6d5e5a8c-7202-45d4-b657-a9c0c9838722%40googlegroups.com.
<Auto Generated Inline Image 1.png>
Hi,are you experiencing issues with an established socket that disconnect or on first connect attempt ?
Julien
On 19 Jan 2018, at 15:25, murtuza chhil <chi...@gmail.com> wrote:
Hello,For a NetClient I want to reattempt connection attempts on disconnects or when the server is not available.I added NetClientOptions to trigger those, but I am not seeing any attempt being made. I use a netcat server on commandline.NetClientOptions ops = new NetClientOptions(); ops.setReconnectInterval(TimeUnit.SECONDS.toMillis(5)) .setReconnectAttempts(100); client = vertx.createNetClient(ops); connect();
To get around this I now call a timer routine to attempt a connect after 5 seconds from every place of failure (could not connect, got disconnected). This is working.vertx.setTimer(5000, handler -> { System.out.println("ReConnect Timer Fired"); connect(); });
My question is why are my NetClientOptions not doing what I think it needs to do?-chhil--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/6123a510-662f-4410-8738-b0a5b9fb860d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/mkz1eMsKmbo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/06C16FA6-C679-4FEA-BC59-720BCD45D273%40julienviet.com.