Modern C++ Kafka API
ClientConfig.h
1 #pragma once
2 
3 #include <kafka/Project.h>
4 
5 #include <kafka/Properties.h>
6 
7 
8 namespace KAFKA_API { namespace clients {
9 
13 class Config: public Properties
14 {
15 public:
16  Config() = default;
17  Config(const Config&) = default;
18  explicit Config(const PropertiesMap& kvMap): Properties(kvMap) {}
19 
26  static const constexpr char* ENABLE_MANUAL_EVENTS_POLL = "enable.manual.events.poll";
27 
32  static const constexpr char* LOG_CB = "log_cb";
33 
38  static const constexpr char* ERROR_CB = "error_cb";
39 
44  static const constexpr char* STATS_CB = "stats_cb";
45 
50  static const constexpr char* OAUTHBEARER_TOKEN_REFRESH_CB = "oauthbearer_token_refresh_cb";
51 
56  static const constexpr char* INTERCEPTORS = "interceptors";
57 
62  static const constexpr char* BOOTSTRAP_SERVERS = "bootstrap.servers";
63 
67  static const constexpr char* CLIENT_ID = "client.id";
68 
72  static const constexpr char* LOG_LEVEL = "log_level";
73 
78  static const constexpr char* SOCKET_TIMEOUT_MS = "socket.timeout.ms";
79 
84  static const constexpr char* SECURITY_PROTOCOL = "security.protocol";
85 
90  static const constexpr char* SASL_MECHANISM = "sasl.mechanisms";
91 
95  static const constexpr char* SASL_USERNAME = "sasl.username";
96 
100  static const constexpr char* SASL_PASSWORD = "sasl.password";
101 
105  static const constexpr char* SASL_KERBEROS_KINIT_CMD = "sasl.kerberos.kinit.cmd";
106 
110  static const constexpr char* SASL_KERBEROS_SERVICE_NAME = "sasl.kerberos.service.name";
111 
120  static const constexpr char* SASL_OAUTHBEARER_METHOD = "sasl.oauthbearer.method";
121 
126  static const constexpr char* SASL_OAUTHBEARER_CLIENT_ID = "sasl.oauthbearer.client.id";
127 
132  static const constexpr char* SASL_OAUTHBEARER_CLIENT_SECRET = "sasl.oauthbearer.client.secret";
133 
138  static const constexpr char* SASL_OAUTHBEARER_EXTENSIONS = "sasl.oauthbearer.extensions";
139 
144  static const constexpr char* SASL_OAUTHBEARER_SCOPE = "sasl.oauthbearer.scope";
145 
150  static const constexpr char* SASL_OAUTHBEARER_TOKEN_ENDPOINT_URL = "sasl.oauthbearer.token.endpoint.url";
151 
156  static const constexpr char* SASL_OAUTHBEARER_CONFIG = "sasl.oauthbearer.config";
157 
163  static const constexpr char* ENABLE_SASL_OAUTHBEARER_UNSECURE_JWT = "enable.sasl.oauthbearer.unsecure.jwt";
164 };
165 
166 } } // end of KAFKA_API::clients
167 
The properties for Kafka clients.
Definition: Properties.h:24
Configuration for Kafka clients.
Definition: ClientConfig.h:14
static constexpr const char * SASL_USERNAME
SASL username for use with the PLAIN and SASL-SCRAM-.
Definition: ClientConfig.h:95
static constexpr const char * ERROR_CB
Log callback.
Definition: ClientConfig.h:38
static constexpr const char * BOOTSTRAP_SERVERS
The string contains host:port pairs of brokers (splitted by ",") that the consumer will use to establ...
Definition: ClientConfig.h:62
static constexpr const char * SASL_OAUTHBEARER_METHOD
Set to "default" or "oidc" to control with login method to be used.
Definition: ClientConfig.h:120
static constexpr const char * LOG_CB
Log callback.
Definition: ClientConfig.h:32
static constexpr const char * SASL_OAUTHBEARER_CLIENT_ID
Public identifier for the applicaition.
Definition: ClientConfig.h:126
static constexpr const char * SASL_OAUTHBEARER_CLIENT_SECRET
Client secret only known to the application and the authorization server.
Definition: ClientConfig.h:132
static constexpr const char * SOCKET_TIMEOUT_MS
Timeout for network requests.
Definition: ClientConfig.h:78
static constexpr const char * SASL_OAUTHBEARER_TOKEN_ENDPOINT_URL
OAuth/OIDC issuer token endpoint HTTP(S) URI used to retreve token.
Definition: ClientConfig.h:150
static constexpr const char * ENABLE_MANUAL_EVENTS_POLL
To poll the events manually (otherwise, it would be done with a background polling thread).
Definition: ClientConfig.h:26
static constexpr const char * STATS_CB
Statistics callback.
Definition: ClientConfig.h:44
static constexpr const char * SASL_MECHANISM
SASL mechanism to use for authentication.
Definition: ClientConfig.h:90
static constexpr const char * LOG_LEVEL
Log level (syslog(3) levels).
Definition: ClientConfig.h:72
static constexpr const char * SASL_OAUTHBEARER_SCOPE
Client use this to specify the scope of the access request to the broker.
Definition: ClientConfig.h:144
static constexpr const char * INTERCEPTORS
Interceptors for thread start/exit, brokers' state change, etc.
Definition: ClientConfig.h:56
static constexpr const char * SECURITY_PROTOCOL
Protocol used to communicate with brokers.
Definition: ClientConfig.h:84
static constexpr const char * OAUTHBEARER_TOKEN_REFRESH_CB
OAUTHBEARER token refresh callback.
Definition: ClientConfig.h:50
static constexpr const char * SASL_OAUTHBEARER_EXTENSIONS
Allow additional information to be provided to the broker.
Definition: ClientConfig.h:138
static constexpr const char * SASL_PASSWORD
SASL password for use with the PLAIN and SASL-SCRAM-.
Definition: ClientConfig.h:100
static constexpr const char * SASL_KERBEROS_KINIT_CMD
Shell command to refresh or acquire the client's Kerberos ticket.
Definition: ClientConfig.h:105
static constexpr const char * CLIENT_ID
Client identifier.
Definition: ClientConfig.h:67
static constexpr const char * SASL_OAUTHBEARER_CONFIG
SASL/OAUTHBEARER configuration.
Definition: ClientConfig.h:156
static constexpr const char * SASL_KERBEROS_SERVICE_NAME
The client's Kerberos principal name.
Definition: ClientConfig.h:110
static constexpr const char * ENABLE_SASL_OAUTHBEARER_UNSECURE_JWT
Enable the builtin unsecure JWT OAUTHBEARER token handler if no oauthbearer_refresh_cb has been set.
Definition: ClientConfig.h:163