public class KafkaClientOptions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TRACE_PEER_ADDRESS
Default peer address to set in traces tags is null, and will automatically pick up bootstrap server from config
|
static TracingPolicy |
DEFAULT_TRACING_POLICY
Default tracing policy is 'propagate'
|
Constructor and Description |
---|
KafkaClientOptions() |
KafkaClientOptions(JsonObject json) |
Modifier and Type | Method and Description |
---|---|
static KafkaClientOptions |
fromMap(Map<String,Object> config,
boolean isProducer)
Create KafkaClientOptions from underlying Kafka config as map
|
static KafkaClientOptions |
fromProperties(Properties config,
boolean isProducer)
Create KafkaClientOptions from underlying Kafka config as Properties
|
Map<String,Object> |
getConfig() |
String |
getTracePeerAddress() |
TracingPolicy |
getTracingPolicy() |
KafkaClientOptions |
setConfig(Map<String,Object> config)
Set the Kafka config.
|
KafkaClientOptions |
setConfig(String key,
Object value)
Set a Kafka config entry.
|
KafkaClientOptions |
setTracePeerAddress(String tracePeerAddress)
Set the Kafka address to show in trace tags.
|
KafkaClientOptions |
setTracingPolicy(TracingPolicy tracingPolicy)
Set the Kafka tracing policy.
|
JsonObject |
toJson() |
public static final String DEFAULT_TRACE_PEER_ADDRESS
public static final TracingPolicy DEFAULT_TRACING_POLICY
public KafkaClientOptions()
public KafkaClientOptions(JsonObject json)
public static KafkaClientOptions fromMap(Map<String,Object> config, boolean isProducer)
config
- config map to be passed down to underlying Kafka clientpublic static KafkaClientOptions fromProperties(Properties config, boolean isProducer)
config
- config properties to be passed down to underlying Kafka clientpublic KafkaClientOptions setConfig(Map<String,Object> config)
config
- the configpublic KafkaClientOptions setConfig(String key, Object value)
key
- the config keyvalue
- the config valuepublic TracingPolicy getTracingPolicy()
public KafkaClientOptions setTracingPolicy(TracingPolicy tracingPolicy)
tracingPolicy
- the tracing policypublic String getTracePeerAddress()
public KafkaClientOptions setTracePeerAddress(String tracePeerAddress)
tracePeerAddress
- the Kafka "peer address" to show in trace tagspublic JsonObject toJson()
Copyright © 2022 Eclipse. All rights reserved.