pulsar-client-cpp
Public Member Functions | Friends | List of all members
pulsar::ClientConfiguration Class Reference

Public Member Functions

 ClientConfiguration (const ClientConfiguration &)
 
ClientConfiguration & operator= (const ClientConfiguration &)
 
ClientConfiguration & setAuth (const AuthenticationPtr &authentication)
 
const Authentication & getAuth () const
 
ClientConfiguration & setOperationTimeoutSeconds (int timeout)
 
int getOperationTimeoutSeconds () const
 
ClientConfiguration & setIOThreads (int threads)
 
int getIOThreads () const
 
ClientConfiguration & setMessageListenerThreads (int threads)
 
int getMessageListenerThreads () const
 
ClientConfiguration & setConcurrentLookupRequest (int concurrentLookupRequest)
 
int getConcurrentLookupRequest () const
 
ClientConfiguration & setLogConfFilePath (const std::string &logConfFilePath)
 
const std::string & getLogConfFilePath () const
 
ClientConfiguration & setLogger (LoggerFactoryPtr loggerFactory)
 
LoggerFactoryPtr getLogger () const
 
ClientConfiguration & setUseTls (bool useTls)
 
bool isUseTls () const
 
ClientConfiguration & setTlsTrustCertsFilePath (const std::string &tlsTrustCertsFilePath)
 
std::string getTlsTrustCertsFilePath () const
 
ClientConfiguration & setTlsAllowInsecureConnection (bool allowInsecure)
 
bool isTlsAllowInsecureConnection () const
 
ClientConfiguration & setValidateHostName (bool validateHostName)
 
bool isValidateHostName () const
 
ClientConfiguration & setStatsIntervalInSeconds (const unsigned int &)
 
const unsigned int & getStatsIntervalInSeconds () const
 

Friends

class ClientImpl
 
class PulsarWrapper
 

Member Function Documentation

◆ getAuth()

const Authentication& pulsar::ClientConfiguration::getAuth ( ) const
Returns
the authentication data

◆ getConcurrentLookupRequest()

int pulsar::ClientConfiguration::getConcurrentLookupRequest ( ) const
Returns
Get configured total allowed concurrent lookup-request.

◆ getIOThreads()

int pulsar::ClientConfiguration::getIOThreads ( ) const
Returns
the number of IO threads to use

◆ getLogConfFilePath()

const std::string& pulsar::ClientConfiguration::getLogConfFilePath ( ) const

Get the path of log configuration file (log4cpp)

◆ 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

◆ setAuth()

ClientConfiguration& pulsar::ClientConfiguration::setAuth ( const AuthenticationPtr &  authentication)

Set the authentication method to be used with the broker

Parameters
authenticationthe 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
concurrentLookupRequest

◆ setIOThreads()

ClientConfiguration& pulsar::ClientConfiguration::setIOThreads ( int  threads)

Set the number of IO threads to be used by the Pulsar client. Default is 1 thread.

Parameters
threadsnumber of threads

◆ setLogConfFilePath()

ClientConfiguration& pulsar::ClientConfiguration::setLogConfFilePath ( const std::string &  logConfFilePath)

Initialize the log configuration

Parameters
logConfFilePathpath of the configuration file
Deprecated:

◆ setLogger()

ClientConfiguration& pulsar::ClientConfiguration::setLogger ( LoggerFactoryPtr  loggerFactory)

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.

◆ setMessageListenerThreads()

ClientConfiguration& pulsar::ClientConfiguration::setMessageListenerThreads ( int  threads)

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
threadsnumber of threads

◆ setOperationTimeoutSeconds()

ClientConfiguration& pulsar::ClientConfiguration::setOperationTimeoutSeconds ( int  timeout)

Set timeout on client operations (subscribe, create producer, close, unsubscribe) Default is 30 seconds.

Parameters
timeoutthe timeout after which the operation will be considered as failed

The documentation for this class was generated from the following file: