You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like to enable immediateConnectTimeout option to improve first gRPC call performance, but there is a downside: gRPC server must be available on client application startup. Otherwise IllegalStateException is thrown and application context startup fails (see net.devh.boot.grpc.client.channelfactory.AbstractChannelFactory#connectOnStartup, line 301):
`
if (!connected) {
throw new IllegalStateException("Can't connect to channel " + name);
}
`
The solution
Please add a configutation property to make throwing exception optional (e.g. immediateConnectError or similar). This property could be enabled by default to keep backward compatibility. The code sniplet above could be changed to something like this:
`
if (!connected && this.properties.getChannel(name).getImmediateConnectError()) {
throw new IllegalStateException("Can't connect to channel " + name);
}
`
Alternatives considered
There is a way to implement custom StubTransformer and access ManagedChannel using reflection, but this is ugly and strictly relyes on internal implementation, that could be changed in future versions.
The text was updated successfully, but these errors were encountered:
The problem
We'd like to enable immediateConnectTimeout option to improve first gRPC call performance, but there is a downside: gRPC server must be available on client application startup. Otherwise IllegalStateException is thrown and application context startup fails (see net.devh.boot.grpc.client.channelfactory.AbstractChannelFactory#connectOnStartup, line 301):
`
`
The solution
Please add a configutation property to make throwing exception optional (e.g. immediateConnectError or similar). This property could be enabled by default to keep backward compatibility. The code sniplet above could be changed to something like this:
`
`
Alternatives considered
There is a way to implement custom StubTransformer and access ManagedChannel using reflection, but this is ugly and strictly relyes on internal implementation, that could be changed in future versions.
The text was updated successfully, but these errors were encountered: