ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Mekhanikov <dmekhani...@gmail.com>
Subject Re: Ignition Start - Timeout if connection is unsuccessful
Date Wed, 11 Sep 2019 08:26:11 GMT

There is a TcpDiscoverySpi property, that defines this behaviour:
TcpDiscoverySpi#joinTimeout [1]. So, instead of calling
Ignition.start() with a special property, you can specify this timeout
in the configuration.
If a join attempt is failed and joinTimeout is already exceeded, then
the client will stop trying.
Note, that this timeout is not strict, and the connection may take
longer before it fails in case if TcpDiscoverySpi#reconnectDelay [2]
is set or each connection attempt takes a long time.

[1] https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.html#setJoinTimeout-long-
[2] https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.html#setReconnectDelay-int-


ср, 11 сент. 2019 г. в 09:30, Mahesh Renduchintala
> Hello
> We are currently using Ignition.Start to get the handle for thick client.
> >> ignite = Ignition.start(cfg);
> As I understand, this API is a blocking API, unless the connection is successfully established.
> However, in some scenarios, where the thick client is unable to connect properly, it
is preferable to have a timeout option as specified below.
> >> ignite = Ignition.start(cfg,  timeout);
> is this already available today? If not, can you take it as an enhancement request for
> The reason why I ask is, in some scenarios, when a thick client comes up for the very
first time, we see thick client making an attempt to connect to ignite servers almost in an
infinite loop.
> Previously, I raised this infinite loop connecting issue before.
> http://apache-ignite-users.70518.x6.nabble.com/client-reconnect-working-td28570.html
> regards
> mahesh

View raw message