Package io.vertx.kafka.client.common
Class KafkaClientOptions
java.lang.Object
io.vertx.kafka.client.common.KafkaClientOptions
Generic KafkaClient options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault peer address to set in traces tags is null, and will automatically pick up bootstrap server from configstatic final TracingPolicyDefault tracing policy is 'propagate' -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KafkaClientOptionsCreate KafkaClientOptions from underlying Kafka config as mapstatic KafkaClientOptionsfromProperties(Properties config, boolean isProducer) Create KafkaClientOptions from underlying Kafka config as PropertiesSet a Kafka config entry.Set the Kafka config.setTracePeerAddress(String tracePeerAddress) Set the Kafka address to show in trace tags.setTracingPolicy(TracingPolicy tracingPolicy) Set the Kafka tracing policy.toJson()
-
Field Details
-
DEFAULT_TRACE_PEER_ADDRESS
Default peer address to set in traces tags is null, and will automatically pick up bootstrap server from config -
DEFAULT_TRACING_POLICY
Default tracing policy is 'propagate'
-
-
Constructor Details
-
KafkaClientOptions
public KafkaClientOptions() -
KafkaClientOptions
-
-
Method Details
-
fromMap
Create KafkaClientOptions from underlying Kafka config as map- Parameters:
config- config map to be passed down to underlying Kafka client- Returns:
- an instance of KafkaClientOptions
-
fromProperties
Create KafkaClientOptions from underlying Kafka config as Properties- Parameters:
config- config properties to be passed down to underlying Kafka client- Returns:
- an instance of KafkaClientOptions
-
getConfig
- Returns:
- the kafka config
-
setConfig
Set the Kafka config.- Parameters:
config- the config- Returns:
- a reference to this, so the API can be used fluently
-
setConfig
Set a Kafka config entry.- Parameters:
key- the config keyvalue- the config value- Returns:
- a reference to this, so the API can be used fluently
-
getTracingPolicy
- Returns:
- the kafka tracing policy
-
setTracingPolicy
Set the Kafka tracing policy.- Parameters:
tracingPolicy- the tracing policy- Returns:
- a reference to this, so the API can be used fluently
-
getTracePeerAddress
- Returns:
- the Kafka "peer address" to show in trace tags
-
setTracePeerAddress
Set the Kafka address to show in trace tags. Or leave it unset to automatically pick up bootstrap server from config instead.- Parameters:
tracePeerAddress- the Kafka "peer address" to show in trace tags- Returns:
- a reference to this, so the API can be used fluently
-
toJson
-