Package io.vertx.kafka.client.common

## Class KafkaClientOptions

- java.lang.Object
- - io.vertx.kafka.client.common.KafkaClientOptions

-     public class KafkaClientOptions
      extends Object

  Generic KafkaClient options.

- - ### Field Summary

    Fields
    Modifier and Type | Field | 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 Summary

    Constructors
    Constructor | Description
    --- | ---
    `KafkaClientOptions()` |
    `KafkaClientOptions​(JsonObject json)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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​(String key, Object value)` | Set a Kafka config entry.
    `KafkaClientOptions` | `setConfig​(Map<String,​Object> config)` | Set the Kafka config.
    `KafkaClientOptions` | `setTracePeerAddress​(String tracePeerAddress)` | Set the Kafka address to show in trace tags.
    `KafkaClientOptions` | `setTracingPolicy​(TracingPolicy tracingPolicy)` | Set the Kafka tracing policy.
    `JsonObject` | `toJson()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_TRACE_PEER_ADDRESS

          public static final String 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

          public static final TracingPolicy DEFAULT_TRACING_POLICY

      Default tracing policy is 'propagate'

  - ### Constructor Detail

    - #### KafkaClientOptions

          public KafkaClientOptions()

    - #### KafkaClientOptions

          public KafkaClientOptions​(JsonObject json)

  - ### Method Detail

    - #### fromMap

          public static KafkaClientOptions fromMap​(Map<String,​Object> config,
                                                   boolean isProducer)

      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

          public static KafkaClientOptions fromProperties​(Properties config,
                                                          boolean isProducer)

      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

          public Map<String,​Object> getConfig()

      Returns:
        the kafka config

    - #### setConfig

          public KafkaClientOptions setConfig​(Map<String,​Object> config)

      Set the Kafka config.
      Parameters:
        `config` - the config
      Returns:
        a reference to this, so the API can be used fluently

    - #### setConfig

          public KafkaClientOptions setConfig​(String key,
                                              Object value)

      Set a Kafka config entry.
      Parameters:
        `key` - the config key
        `value` - the config value
      Returns:
        a reference to this, so the API can be used fluently

    - #### getTracingPolicy

          public TracingPolicy getTracingPolicy()

      Returns:
        the kafka tracing policy

    - #### setTracingPolicy

          public KafkaClientOptions setTracingPolicy​(TracingPolicy tracingPolicy)

      Set the Kafka tracing policy.
      Parameters:
        `tracingPolicy` - the tracing policy
      Returns:
        a reference to this, so the API can be used fluently

    - #### getTracePeerAddress

          public String getTracePeerAddress()

      Returns:
        the Kafka "peer address" to show in trace tags

    - #### setTracePeerAddress

          public KafkaClientOptions setTracePeerAddress​(String tracePeerAddress)

      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

          public JsonObject toJson()