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

Public Member Functions

 ClientConfiguration (const ClientConfiguration &)
 
ClientConfigurationoperator= (const ClientConfiguration &)
 
ClientConfigurationsetAuth (const AuthenticationPtr &authentication)
 
const AuthenticationgetAuth () const
 
ClientConfigurationsetOperationTimeoutSeconds (int timeout)
 
int getOperationTimeoutSeconds () const
 
ClientConfigurationsetIOThreads (int threads)
 
int getIOThreads () const
 
ClientConfigurationsetMessageListenerThreads (int threads)
 
int getMessageListenerThreads () const
 
ClientConfigurationsetConcurrentLookupRequest (int concurrentLookupRequest)
 
int getConcurrentLookupRequest () const
 
ClientConfigurationsetLogConfFilePath (const std::string &logConfFilePath)
 
const std::string & getLogConfFilePath () const
 
ClientConfigurationsetUseTls (bool useTls)
 
bool isUseTls () const
 
ClientConfigurationsetTlsTrustCertsFilePath (const std::string &tlsTrustCertsFilePath)
 
std::string getTlsTrustCertsFilePath () const
 
ClientConfigurationsetTlsAllowInsecureConnection (bool allowInsecure)
 
bool isTlsAllowInsecureConnection () const
 
ClientConfigurationsetStatsIntervalInSeconds (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: 5000) 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

◆ 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: