You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Denis Mekhanikov <dm...@gmail.com> on 2019/09/11 08:26:11 UTC

Re: Ignition Start - Timeout if connection is unsuccessful

Mahesh,

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-

Denis

ср, 11 сент. 2019 г. в 09:30, Mahesh Renduchintala
<ma...@aline-consulting.com>:
>
> 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 2.8.
>
> 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
>
>
>
>