Uses of Interface
org.apache.pulsar.client.api.ClientBuilder
Package
Description
Pulsar Client API.
Helpers which provide useful functionality for the implementation of Pulsar Client API.
-
Uses of ClientBuilder in org.apache.pulsar.client.api
Modifier and TypeMethodDescriptionClientBuilder.allowTlsInsecureConnection
(boolean allowTlsInsecureConnection) Configure whether the Pulsar client accept untrusted TLS certificate from broker (default: false).ClientBuilder.authentication
(String authPluginClassName, String authParamsString) Configure the authentication provider to use in the Pulsar client instance.ClientBuilder.authentication
(String authPluginClassName, Map<String, String> authParams) Configure the authentication provider to use in the Pulsar client instance using a config map.ClientBuilder.authentication
(Authentication authentication) Set the authentication provider to use in the Pulsar client instance.ClientBuilder.autoCertRefreshSeconds
(int autoCertRefreshSeconds) Set Cert Refresh interval in seconds.static ClientBuilder
PulsarClient.builder()
Get a new builder instance that can used to configure and build aPulsarClient
instance.The clock used by the pulsar client.ClientBuilder.clone()
Create a copy of the current client builder.ClientBuilder.connectionMaxIdleSeconds
(int connectionMaxIdleSeconds) Release the connection if it is not used for more than seconds.ClientBuilder.connectionsPerBroker
(int connectionsPerBroker) Sets the max number of connection that the client library will open to a single broker.ClientBuilder.connectionTimeout
(int duration, TimeUnit unit) Set the duration of time to wait for a connection to a broker to be established.ClientBuilder.dnsLookupBind
(String address, int port) Set dns lookup bind address and port.ClientBuilder.dnsServerAddresses
(List<InetSocketAddress> addresses) Set dns lookup server addresses.ClientBuilder.enableBusyWait
(boolean enableBusyWait) Option to enable busy-wait settings.ClientBuilder.enableTcpNoDelay
(boolean enableTcpNoDelay) Configure whether to use TCP no-delay flag on the connection, to disable Nagle algorithm.ClientBuilder.enableTls
(boolean enableTls) Deprecated.use "pulsar+ssl://" in serviceUrl to enableClientBuilder.enableTlsHostnameVerification
(boolean enableTlsHostnameVerification) It allows to validate hostname verification when client connects to broker over tls.ClientBuilder.enableTransaction
(boolean enableTransaction) If enable transaction, start the transactionCoordinatorClient with pulsar client.ClientBuilder.ioThreads
(int numIoThreads) Set the number of threads to be used for handling connections to brokers (default: Runtime.getRuntime().availableProcessors()).ClientBuilder.keepAliveInterval
(int keepAliveInterval, TimeUnit unit) Set keep alive interval for each client-broker-connection.ClientBuilder.listenerName
(String name) Configure the listenerName that the broker will return the corresponding `advertisedListener`.ClientBuilder.listenerThreads
(int numListenerThreads) Set the number of threads to be used for message listeners (default: Runtime.getRuntime().availableProcessors()).Load the configuration from provided config map.ClientBuilder.lookupProperties
(Map<String, String> properties) Set the properties used for topic lookup.ClientBuilder.lookupTimeout
(int lookupTimeout, TimeUnit unit) Set lookup timeout (default: matches operation timeout)ClientBuilder.maxBackoffInterval
(long duration, TimeUnit unit) Set the maximum duration of time for a backoff interval.ClientBuilder.maxConcurrentLookupRequests
(int maxConcurrentLookupRequests) Number of concurrent lookup-requests allowed to send on each broker-connection to prevent overload on broker.ClientBuilder.maxLookupRedirects
(int maxLookupRedirects) Set the maximum number of times a lookup-request to a broker will be redirected.ClientBuilder.maxLookupRequests
(int maxLookupRequests) Number of max lookup-requests allowed on each broker-connection to prevent overload on broker.ClientBuilder.maxNumberOfRejectedRequestPerConnection
(int maxNumberOfRejectedRequestPerConnection) Set max number of broker-rejected requests in a certain time-frame (60 seconds) after which current connection will be closed and client creates a new connection that give chance to connect a different broker (default: 50).ClientBuilder.memoryLimit
(long memoryLimit, SizeUnit unit) Configure a limit on the amount of direct memory that will be allocated by this client instance.ClientBuilder.openTelemetry
(io.opentelemetry.api.OpenTelemetry openTelemetry) Configure OpenTelemetry for Pulsar ClientClientBuilder.operationTimeout
(int operationTimeout, TimeUnit unit) Set the operation timeout (default: 30 seconds).ClientBuilder.proxyServiceUrl
(String proxyServiceUrl, ProxyProtocol proxyProtocol) Proxy-service url when client would like to connect to broker via proxy.ClientBuilder.serviceUrl
(String serviceUrl) Configure the service URL for the Pulsar service.ClientBuilder.serviceUrlProvider
(ServiceUrlProvider serviceUrlProvider) Configure the service URL provider for Pulsar service.ClientBuilder.socks5ProxyAddress
(InetSocketAddress socks5ProxyAddress) Set socks5 proxy address.ClientBuilder.socks5ProxyPassword
(String socks5ProxyPassword) Set socks5 proxy password.ClientBuilder.socks5ProxyUsername
(String socks5ProxyUsername) Set socks5 proxy username.ClientBuilder.sslFactoryPlugin
(String sslFactoryPlugin) Set the SSL Factory Plugin for custom implementation to create SSL Context and SSLEngine.ClientBuilder.sslFactoryPluginParams
(String sslFactoryPluginParams) Set the SSL Factory Plugin params for the ssl factory plugin to use.ClientBuilder.sslProvider
(String sslProvider) The name of the security provider used for SSL connections.ClientBuilder.startingBackoffInterval
(long duration, TimeUnit unit) Set the duration of time for a backoff interval.ClientBuilder.statsInterval
(long statsInterval, TimeUnit unit) Deprecated.ClientBuilder.tlsCertificateFilePath
(String tlsCertificateFilePath) Set the path to the TLS certificate file.ClientBuilder.tlsCiphers
(Set<String> tlsCiphers) A list of cipher suites.ClientBuilder.tlsKeyFilePath
(String tlsKeyFilePath) Set the path to the TLS key file.ClientBuilder.tlsKeyStorePassword
(String tlsKeyStorePassword) The store password for the key store file.ClientBuilder.tlsKeyStorePath
(String tlsTrustStorePath) The location of the key store file.ClientBuilder.tlsKeyStoreType
(String tlsKeyStoreType) The file format of the key store file.ClientBuilder.tlsProtocols
(Set<String> tlsProtocols) The SSL protocol used to generate the SSLContext.ClientBuilder.tlsTrustCertsFilePath
(String tlsTrustCertsFilePath) Set the path to the trusted TLS certificate file.ClientBuilder.tlsTrustStorePassword
(String tlsTrustStorePassword) The store password for the key store file.ClientBuilder.tlsTrustStorePath
(String tlsTrustStorePath) The location of the trust store file.ClientBuilder.tlsTrustStoreType
(String tlsTrustStoreType) The file format of the trust store file.ClientBuilder.useKeyStoreTls
(boolean useKeyStoreTls) If Tls is enabled, whether use KeyStore type as tls configuration parameter. -
Uses of ClientBuilder in org.apache.pulsar.client.internal