influxdata / influxdb-client-java

InfluxDB 2 JVM Based Clients
https://influxdata.github.io/influxdb-client-java/
MIT License
431 stars 129 forks source link

description of RETRY_INTERVAL & MAX_RETRIES #756

Closed mehrdad2000 closed 1 month ago

mehrdad2000 commented 1 month ago

Hi Would you please explain what is the meaning of this two parameters:

client/src/main/java/com/influxdb/client/WriteOptions.java
    public static final int DEFAULT_RETRY_INTERVAL = 5000;
    public static final int DEFAULT_MAX_RETRIES = 5;

1-5000 second or milisecond? 2-try 5 times in row then after 5000 second do this again and again? 3-each 5000 second try one time, do this 5 time and will not retry anymore?

Thanks

bednar commented 1 month ago

Hi @mehrdad2000,

the parameters are described in JavaDoc and README:

image

https://github.com/influxdata/influxdb-client-java/tree/master/client#asynchronous-non-blocking-api

Best Regards

mehrdad2000 commented 1 month ago

@bednar thanks for answer. After 5 time retry it will stop trying? Right? Is there anyway to set parameters in somehow that trying until it will connect? And it’s not stop trying?

bednar commented 1 month ago

@bednar thanks for answer. After 5 time retry it will stop trying? Right? Yes. Is there anyway to set parameters in somehow that trying until it will connect? And it’s not stop trying? You can set maxRetries to vary large number together with maxRetryDelay.