|
enum | ProxyProtocol { SNI = 0
} |
|
|
class | ClientImpl |
|
class | PulsarWrapper |
|
◆ getAuth()
- Returns
- the authentication data
◆ getConcurrentLookupRequest()
int pulsar::ClientConfiguration::getConcurrentLookupRequest |
( |
| ) |
const |
- Returns
- Get configured total allowed concurrent lookup-request.
◆ getConnectionsPerBroker()
int pulsar::ClientConfiguration::getConnectionsPerBroker |
( |
| ) |
const |
- Returns
- the max number of connection that the client library will open to a single broker
◆ getConnectionTimeout()
int pulsar::ClientConfiguration::getConnectionTimeout |
( |
| ) |
const |
◆ getInitialBackoffIntervalMs()
int pulsar::ClientConfiguration::getInitialBackoffIntervalMs |
( |
| ) |
const |
- Returns
- Get initial backoff interval in milliseconds.
◆ getIOThreads()
int pulsar::ClientConfiguration::getIOThreads |
( |
| ) |
const |
- Returns
- the number of IO threads to use
◆ getListenerName()
const std::string & pulsar::ClientConfiguration::getListenerName |
( |
| ) |
const |
- Returns
- the listener name for the broker
◆ getMaxBackoffIntervalMs()
int pulsar::ClientConfiguration::getMaxBackoffIntervalMs |
( |
| ) |
const |
- Returns
- Get max backoff interval in milliseconds.
◆ getMaxLookupRedirects()
int pulsar::ClientConfiguration::getMaxLookupRedirects |
( |
| ) |
const |
- Returns
- Get configured total allowed lookup redirecting.
◆ getMemoryLimit()
uint64_t pulsar::ClientConfiguration::getMemoryLimit |
( |
| ) |
const |
- Returns
- the client memory limit in bytes
◆ getMessageListenerThreads()
int pulsar::ClientConfiguration::getMessageListenerThreads |
( |
| ) |
const |
- Returns
- the number of IO threads to use
◆ getOperationTimeoutSeconds()
int pulsar::ClientConfiguration::getOperationTimeoutSeconds |
( |
| ) |
const |
- Returns
- the client operations timeout in seconds
◆ getPartitionsUpdateInterval()
unsigned int pulsar::ClientConfiguration::getPartitionsUpdateInterval |
( |
| ) |
const |
Get partitions update interval in seconds.
◆ getStatsIntervalInSeconds()
const unsigned int & pulsar::ClientConfiguration::getStatsIntervalInSeconds |
( |
| ) |
const |
- Returns
- the stats interval configured for the client
◆ getTlsCertificateFilePath()
const std::string & pulsar::ClientConfiguration::getTlsCertificateFilePath |
( |
| ) |
const |
- Returns
- the path to the TLS certificate file
◆ getTlsPrivateKeyFilePath()
const std::string & pulsar::ClientConfiguration::getTlsPrivateKeyFilePath |
( |
| ) |
const |
- Returns
- the path to the TLS private key file
◆ getTlsTrustCertsFilePath()
const std::string & pulsar::ClientConfiguration::getTlsTrustCertsFilePath |
( |
| ) |
const |
- Returns
- the path to the trusted TLS certificate file
◆ isTlsAllowInsecureConnection()
bool pulsar::ClientConfiguration::isTlsAllowInsecureConnection |
( |
| ) |
const |
- Returns
- whether the Pulsar client accepts untrusted TLS certificates from brokers
◆ isUseTls()
bool pulsar::ClientConfiguration::isUseTls |
( |
| ) |
const |
- Returns
- whether the TLS encryption is used on the connections
◆ isValidateHostName()
bool pulsar::ClientConfiguration::isValidateHostName |
( |
| ) |
const |
- Returns
- true if the TLS hostname verification is enabled
◆ setAuth()
ClientConfiguration & pulsar::ClientConfiguration::setAuth |
( |
const AuthenticationPtr & |
authentication | ) |
|
Set the authentication method to be used with the broker
- Parameters
-
authentication | the authentication data to use |
◆ setConcurrentLookupRequest()
ClientConfiguration & pulsar::ClientConfiguration::setConcurrentLookupRequest |
( |
int |
concurrentLookupRequest | ) |
|
Number of concurrent lookup-requests allowed on each broker-connection to prevent overload on broker. (default: 50000) It should be configured with higher value only in case of it requires to produce/subscribe on thousands of topic using created PulsarClient
- Parameters
-
◆ setConnectionsPerBroker()
ClientConfiguration & pulsar::ClientConfiguration::setConnectionsPerBroker |
( |
int |
connectionsPerBroker | ) |
|
Sets the max number of connection that the client library will open to a single broker. By default, the connection pool will use a single connection for all the producers and consumers. Increasing this parameter may improve throughput when using many producers over a high latency connection.
- Parameters
-
connectionsPerBroker | max number of connections per broker (needs to be greater than 0) |
◆ setConnectionTimeout()
Set the duration of time to wait for a connection to a broker to be established. If the duration passes without a response from the broker, the connection attempt is dropped.
Default: 10000
- Parameters
-
timeoutMs | the duration in milliseconds |
- Returns
◆ setInitialBackoffIntervalMs()
ClientConfiguration & pulsar::ClientConfiguration::setInitialBackoffIntervalMs |
( |
int |
initialBackoffIntervalMs | ) |
|
Initial backoff interval in milliseconds. (default: 100)
- Parameters
-
◆ setIOThreads()
Set the number of IO threads to be used by the Pulsar client. Default is 1 thread.
- Parameters
-
◆ setListenerName()
ClientConfiguration & pulsar::ClientConfiguration::setListenerName |
( |
const std::string & |
listenerName | ) |
|
Configure the listener name that the broker returns the corresponding advertisedListener
.
- Parameters
-
◆ setLogger()
Configure a custom logger backend to route of Pulsar client library to a different logger implementation.
By default, log messages are printed on standard output.
When passed in, the configuration takes ownership of the loggerFactory object. The logger factory can only be set once per process. Any subsequent calls to set the logger factory will have no effect, though the logger factory object will be cleaned up.
◆ setMaxBackoffIntervalMs()
ClientConfiguration & pulsar::ClientConfiguration::setMaxBackoffIntervalMs |
( |
int |
maxBackoffIntervalMs | ) |
|
Max backoff interval in milliseconds. (default: 60000)
- Parameters
-
◆ setMaxLookupRedirects()
ClientConfiguration & pulsar::ClientConfiguration::setMaxLookupRedirects |
( |
int |
maxLookupRedirects | ) |
|
Max number of lookup redirection allowed on each look request to prevent overload on broker. (default: 20)
- Parameters
-
◆ setMemoryLimit()
Configure a limit on the amount of memory that will be allocated by this client instance. Setting this to 0 will disable the limit. By default this is disabled.
- Parameters
-
memoryLimitBytes | the memory limit |
◆ setMessageListenerThreads()
Set the number of threads to be used by the Pulsar client when delivering messages through message listener. Default is 1 thread per Pulsar client.
If using more than 1 thread, messages for distinct MessageListener will be delivered in different threads, however a single MessageListener will always be assigned to the same thread.
- Parameters
-
◆ setOperationTimeoutSeconds()
Set timeout on client operations (subscribe, create producer, close, unsubscribe) Default is 30 seconds.
- Parameters
-
timeout | the timeout after which the operation will be considered as failed |
◆ setPartititionsUpdateInterval()
ClientConfiguration & pulsar::ClientConfiguration::setPartititionsUpdateInterval |
( |
unsigned int |
intervalInSeconds | ) |
|
Set partitions update interval in seconds. If a partitioned topic is produced or subscribed and intervalInSeconds
is not 0, every intervalInSeconds
seconds the partition number will be retrieved by sending lookup requests. If partition number has been increased, more producer/consumer of increased partitions will be created. Default is 60 seconds.
- Parameters
-
intervalInSeconds | the seconds between two lookup request for partitioned topic's metadata |
◆ setProxyProtocol()
ClientConfiguration & pulsar::ClientConfiguration::setProxyProtocol |
( |
ProxyProtocol |
proxyProtocol | ) |
|
◆ setProxyServiceUrl()
ClientConfiguration & pulsar::ClientConfiguration::setProxyServiceUrl |
( |
const std::string & |
proxyServiceUrl | ) |
|
Set proxy-service url when client would like to connect to broker via proxy. Client must configure both proxyServiceUrl and appropriate proxyProtocol.
Example: pulsar+ssl://ats-proxy.example.com:4443
- Parameters
-
proxyServiceUrl | proxy url to connect with broker |
- Returns
◆ setStatsIntervalInSeconds()
ClientConfiguration & pulsar::ClientConfiguration::setStatsIntervalInSeconds |
( |
const unsigned int & |
| ) |
|
Initialize stats interval in seconds. Stats are printed and reset after every statsIntervalInSeconds
.
Default: 600
Set to 0 means disabling stats collection.
◆ setTlsAllowInsecureConnection()
ClientConfiguration & pulsar::ClientConfiguration::setTlsAllowInsecureConnection |
( |
bool |
allowInsecure | ) |
|
Configure whether the Pulsar client accepts untrusted TLS certificates from brokers.
The default value is false.
- Parameters
-
tlsAllowInsecureConnection | |
◆ setTlsCertificateFilePath()
ClientConfiguration & pulsar::ClientConfiguration::setTlsCertificateFilePath |
( |
const std::string & |
tlsCertificateFilePath | ) |
|
Set the path to the TLS certificate file.
- Parameters
-
◆ setTlsPrivateKeyFilePath()
ClientConfiguration & pulsar::ClientConfiguration::setTlsPrivateKeyFilePath |
( |
const std::string & |
tlsKeyFilePath | ) |
|
Set the path to the TLS private key file.
- Parameters
-
◆ setTlsTrustCertsFilePath()
ClientConfiguration & pulsar::ClientConfiguration::setTlsTrustCertsFilePath |
( |
const std::string & |
tlsTrustCertsFilePath | ) |
|
Set the path to the trusted TLS certificate file.
- Parameters
-
◆ setUseTls()
Configure whether to use the TLS encryption on the connections.
The default value is false.
- Parameters
-
◆ setValidateHostName()
ClientConfiguration & pulsar::ClientConfiguration::setValidateHostName |
( |
bool |
validateHostName | ) |
|
Configure whether it allows validating hostname verification when a client connects to a broker over TLS.
It validates the incoming x509 certificate and matches the provided hostname (CN/SAN) with the expected broker's hostname. It follows the server identity hostname verification in RFC 2818.
The default value is false.
- See also
- RFC 2818.
- Parameters
-
validateHostName | whether to enable the TLS hostname verification |
The documentation for this class was generated from the following file: