-
Notifications
You must be signed in to change notification settings - Fork 44
Client configuration
Regunath B edited this page Dec 20, 2021
·
3 revisions
com.flipkart.flux.client.config.FluxClientConfiguration
is part of flux client module, and used by the user to connect to Flux.
It has the following params
private String fluxRuntimeUrl = "http://localhost:9998/";
private String clientElbId = "defaultElbId";
private long socketTimeout = 10000;
private long connectionTimeout = 10000;
private String targetClientId = "flux-runtime-local" <DEFAULT FOR LOCAL> OR
"flux-runtime-pre-prod" <FOR PRE-PROD> OR
"flux-runtime-prod"; <FOR PROD>
As you see fluxRuntimeUrl
points to localhost
by default. clientElbId
is the Execution Cluster endpoint identifier set to "defaultElbId" by default. To override the values, provide an implementation using Guice.
@Provides
@Singleton
FluxClientConfiguration providesFluxConfiguration(Configuration configuration) {
return new FluxClientConfiguration(fluxRuntimeUrl, clientElbId, socketTimeout, connectionTimeout, targetClientId);
}
For using shared Execution Cluster, users should pass clientElbId value as "defaultElbId".
If above constructor is not called, above mentioned default values are set.
(or)
You can override the value of fluxRuntimeUrl
, clientElbId
and targetClientId
by providing system property flux.runtimeUrl,flux.clientElbId
and flux.targetClientId
respectively as well.
-Dflux.runtimeUrl=http://fluxUrl:port
-Dflux.clientElbId=<Execution Cluster endpoint identifier. "defaultElbId" for shared execution cluster.>
-Dflux.targetClientId=<flux runtime clientId : flux-runtime-local | flux-runtime-pre-prod | flux-runtime-prod>
If both of the above mentioned, then system property takes the precedence.