Package io.camunda.zeebe.client
Interface ZeebeClientBuilder
- All Known Subinterfaces:
ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4
- All Known Implementing Classes:
ZeebeClientBuilderImpl,ZeebeClientCloudBuilderImpl
public interface ZeebeClientBuilder
-
Method Summary
Modifier and TypeMethodDescriptionapplyEnvironmentVariableOverrides(boolean applyEnvironmentVariableOverrides) Allows to disable the mechanism to override some properties by ENVIRONMENT VARIABLES.build()caCertificatePath(String certificatePath) Path to a root CA certificate to be used instead of the certificate in the default default store.credentialsProvider(CredentialsProvider credentialsProvider) A customCredentialsProviderwhich will be used to apply authentication credentials to requests.defaultJobPollInterval(Duration pollInterval) The interval which a job worker is periodically polling for new jobs.defaultJobTimeout(Duration timeout) The timeout which is used when none is provided for a job worker.defaultJobWorkerMaxJobsActive(int maxJobsActive) defaultJobWorkerName(String workerName) The name of the worker which is used when none is set for a job worker.defaultMessageTimeToLive(Duration timeToLive) The time-to-live which is used when none is provided for a message.defaultRequestTimeout(Duration requestTimeout) The request timeout used if not overridden by the command.gatewayAddress(String gatewayAddress) Time interval between keep alive messages sent to the gateway.numJobWorkerExecutionThreads(int numThreads) overrideAuthority(String authority) Overrides the authority used with TLS virtual hosting.Use a plaintext connection between the client and the gateway.withInterceptors(io.grpc.ClientInterceptor... interceptor) withJsonMapper(JsonMapper jsonMapper) withProperties(Properties properties) Sets all the properties from aPropertiesobject.
-
Method Details
-
withProperties
Sets all the properties from aPropertiesobject. Can be used to configure the client from a properties file.See
ClientPropertiesfor valid property names. -
applyEnvironmentVariableOverrides
Allows to disable the mechanism to override some properties by ENVIRONMENT VARIABLES. This is useful if a client shall be constructed for test cases or in an environment that wants to fully control properties (like Spring Boot).The default value is
true. -
gatewayAddress
- Parameters:
gatewayAddress- the IP socket address of a gateway that the client can initially connect to. Must be in formathost:port. The default value is0.0.0.0:26500.
-
defaultJobWorkerMaxJobsActive
- Parameters:
maxJobsActive- Default value forJobWorkerBuilderStep1.JobWorkerBuilderStep3.maxJobsActive(int). Default value is 32.
-
numJobWorkerExecutionThreads
- Parameters:
numThreads- The number of threads for invocation of job workers. Setting this value to 0 effectively disables subscriptions and workers. Default value is 1.
-
defaultJobWorkerName
The name of the worker which is used when none is set for a job worker. Default is 'default'. -
defaultJobTimeout
The timeout which is used when none is provided for a job worker. Default is 5 minutes. -
defaultJobPollInterval
The interval which a job worker is periodically polling for new jobs. Default is 100 milliseconds. -
defaultMessageTimeToLive
The time-to-live which is used when none is provided for a message. Default is 1 hour. -
defaultRequestTimeout
The request timeout used if not overridden by the command. Default is 20 seconds. -
usePlaintext
ZeebeClientBuilder usePlaintext()Use a plaintext connection between the client and the gateway. -
caCertificatePath
Path to a root CA certificate to be used instead of the certificate in the default default store. -
credentialsProvider
A customCredentialsProviderwhich will be used to apply authentication credentials to requests. -
keepAlive
Time interval between keep alive messages sent to the gateway. The default is 45 seconds. -
withInterceptors
-
withJsonMapper
-
overrideAuthority
Overrides the authority used with TLS virtual hosting. Specifically, to override hostname verification in the TLS handshake. It does not change what host is actually connected to.This method is intended for testing, but may safely be used outside of tests as an alternative to DNS overrides.
This setting does nothing if a
plaintextconnection is used.- Parameters:
authority- The alternative authority to use, commonly in the formhostorhost:port
-
build
ZeebeClient build()- Returns:
- a new
ZeebeClientwith the provided configuration options.
-