Class ProducerConfig
- java.lang.Object
-
- org.apache.kafka.common.config.AbstractConfig
-
- org.apache.kafka.clients.producer.ProducerConfig
-
public class ProducerConfig extends AbstractConfig
Configuration for the Kafka Producer. Documentation for these configurations can be found in the Kafka documentation
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACKS_CONFIG
acks
static java.lang.String
BATCH_SIZE_CONFIG
batch.size
static java.lang.String
BOOTSTRAP_SERVERS_CONFIG
bootstrap.servers
static java.lang.String
BUFFER_MEMORY_CONFIG
buffer.memory
static java.lang.String
CLIENT_DNS_LOOKUP_CONFIG
client.dns.lookup
static java.lang.String
CLIENT_ID_CONFIG
client.id
static java.lang.String
COMPRESSION_TYPE_CONFIG
compression.type
static java.lang.String
CONNECTIONS_MAX_IDLE_MS_CONFIG
connections.max.idle.ms
static java.lang.String
DELIVERY_TIMEOUT_MS_CONFIG
delivery.timeout.ms
static java.lang.String
ENABLE_IDEMPOTENCE_CONFIG
enable.idempotence
static java.lang.String
ENABLE_IDEMPOTENCE_DOC
static java.lang.String
INTERCEPTOR_CLASSES_CONFIG
interceptor.classes
static java.lang.String
INTERCEPTOR_CLASSES_DOC
static java.lang.String
KEY_SERIALIZER_CLASS_CONFIG
key.serializer
static java.lang.String
KEY_SERIALIZER_CLASS_DOC
static java.lang.String
LINGER_MS_CONFIG
linger.ms
static java.lang.String
MAX_BLOCK_MS_CONFIG
max.block.ms
static java.lang.String
MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION
max.in.flight.requests.per.connection
static java.lang.String
MAX_REQUEST_SIZE_CONFIG
max.request.size
static java.lang.String
METADATA_MAX_AGE_CONFIG
metadata.max.age.ms
static java.lang.String
METADATA_MAX_IDLE_CONFIG
metadata.max.idle.ms
static java.lang.String
METRIC_REPORTER_CLASSES_CONFIG
metric.reporters
static java.lang.String
METRICS_ENABLED_CONFIG
metrics.enabled
static java.lang.String
METRICS_NUM_SAMPLES_CONFIG
metrics.num.samples
static java.lang.String
METRICS_RECORDING_LEVEL_CONFIG
metrics.recording.level
static java.lang.String
METRICS_SAMPLE_WINDOW_MS_CONFIG
metrics.sample.window.ms
static java.lang.String
PARTITIONER_CLASS_CONFIG
partitioner.class
static java.lang.String
RECEIVE_BUFFER_CONFIG
receive.buffer.bytes
static java.lang.String
RECONNECT_BACKOFF_MAX_MS_CONFIG
reconnect.backoff.max.ms
static java.lang.String
RECONNECT_BACKOFF_MS_CONFIG
reconnect.backoff.ms
static java.lang.String
REQUEST_TIMEOUT_MS_CONFIG
request.timeout.ms
static java.lang.String
RETRIES_CONFIG
retries
static java.lang.String
RETRY_BACKOFF_MS_CONFIG
retry.backoff.ms
static java.lang.String
SECURITY_PROVIDERS_CONFIG
security.providers
static java.lang.String
SEND_BUFFER_CONFIG
send.buffer.bytes
static java.lang.String
STREAMS_BUFFER_TIME_CONFIG
streams.buffer.max.time.ms
static java.lang.String
STREAMS_HARDMOUNT_CONFIG
fs.mapr.hardmount
static java.lang.String
STREAMS_PARALLEL_FLUSHERS_PER_PARTITION_CONFIG
streams.parallel.flushers.per.partition
static java.lang.String
STREAMS_PARTITIONER_CLASS_CONFIG
streams.partitioner.class
static java.lang.String
STREAMS_PRODUCER_DEFAULT_STREAM_CONFIG
streams.producer.default.stream
static java.lang.String
STREAMS_RPC_TIMEOUT_MS_CONFIG
streams.rpc.timeout.ms
static java.lang.String
TRANSACTION_TIMEOUT_CONFIG
transaction.timeout.ms
static java.lang.String
TRANSACTION_TIMEOUT_DOC
static java.lang.String
TRANSACTIONAL_ID_CONFIG
transactional.id
static java.lang.String
TRANSACTIONAL_ID_DOC
static java.lang.String
VALUE_SERIALIZER_CLASS_CONFIG
value.serializer
static java.lang.String
VALUE_SERIALIZER_CLASS_DOC
-
Fields inherited from class org.apache.kafka.common.config.AbstractConfig
CONFIG_PROVIDERS_CONFIG
-
-
Constructor Summary
Constructors Constructor Description ProducerConfig(java.util.Map<java.lang.String,java.lang.Object> props)
ProducerConfig(java.util.Properties props)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Object>
addSerializerToConfig(java.util.Map<java.lang.String,java.lang.Object> configs, Serializer<?> keySerializer, Serializer<?> valueSerializer)
static java.util.Properties
addSerializerToConfig(java.util.Properties properties, Serializer<?> keySerializer, Serializer<?> valueSerializer)
static ConfigDef
configDef()
static java.util.Set<java.lang.String>
configNames()
static void
main(java.lang.String[] args)
protected java.util.Map<java.lang.String,java.lang.Object>
postProcessParsedConfig(java.util.Map<java.lang.String,java.lang.Object> parsedValues)
Called directly after user configs got parsed (and thus default values got set).-
Methods inherited from class org.apache.kafka.common.config.AbstractConfig
documentationOf, equals, get, getBoolean, getClass, getConfiguredInstance, getConfiguredInstances, getConfiguredInstances, getConfiguredInstances, getDouble, getInt, getList, getLong, getPassword, getShort, getString, hashCode, ignore, logUnused, originals, originalsStrings, originalsWithPrefix, originalsWithPrefix, typeOf, unused, values, valuesWithPrefixAllOrNothing, valuesWithPrefixOverride
-
-
-
-
Field Detail
-
BOOTSTRAP_SERVERS_CONFIG
public static final java.lang.String BOOTSTRAP_SERVERS_CONFIG
bootstrap.servers
- See Also:
- Constant Field Values
-
CLIENT_DNS_LOOKUP_CONFIG
public static final java.lang.String CLIENT_DNS_LOOKUP_CONFIG
client.dns.lookup
- See Also:
- Constant Field Values
-
METADATA_MAX_AGE_CONFIG
public static final java.lang.String METADATA_MAX_AGE_CONFIG
metadata.max.age.ms
- See Also:
- Constant Field Values
-
METADATA_MAX_IDLE_CONFIG
public static final java.lang.String METADATA_MAX_IDLE_CONFIG
metadata.max.idle.ms
- See Also:
- Constant Field Values
-
BATCH_SIZE_CONFIG
public static final java.lang.String BATCH_SIZE_CONFIG
batch.size
- See Also:
- Constant Field Values
-
ACKS_CONFIG
public static final java.lang.String ACKS_CONFIG
acks
- See Also:
- Constant Field Values
-
LINGER_MS_CONFIG
public static final java.lang.String LINGER_MS_CONFIG
linger.ms
- See Also:
- Constant Field Values
-
REQUEST_TIMEOUT_MS_CONFIG
public static final java.lang.String REQUEST_TIMEOUT_MS_CONFIG
request.timeout.ms
- See Also:
- Constant Field Values
-
DELIVERY_TIMEOUT_MS_CONFIG
public static final java.lang.String DELIVERY_TIMEOUT_MS_CONFIG
delivery.timeout.ms
- See Also:
- Constant Field Values
-
CLIENT_ID_CONFIG
public static final java.lang.String CLIENT_ID_CONFIG
client.id
- See Also:
- Constant Field Values
-
SEND_BUFFER_CONFIG
public static final java.lang.String SEND_BUFFER_CONFIG
send.buffer.bytes
- See Also:
- Constant Field Values
-
RECEIVE_BUFFER_CONFIG
public static final java.lang.String RECEIVE_BUFFER_CONFIG
receive.buffer.bytes
- See Also:
- Constant Field Values
-
MAX_REQUEST_SIZE_CONFIG
public static final java.lang.String MAX_REQUEST_SIZE_CONFIG
max.request.size
- See Also:
- Constant Field Values
-
RECONNECT_BACKOFF_MS_CONFIG
public static final java.lang.String RECONNECT_BACKOFF_MS_CONFIG
reconnect.backoff.ms
- See Also:
- Constant Field Values
-
RECONNECT_BACKOFF_MAX_MS_CONFIG
public static final java.lang.String RECONNECT_BACKOFF_MAX_MS_CONFIG
reconnect.backoff.max.ms
- See Also:
- Constant Field Values
-
MAX_BLOCK_MS_CONFIG
public static final java.lang.String MAX_BLOCK_MS_CONFIG
max.block.ms
- See Also:
- Constant Field Values
-
BUFFER_MEMORY_CONFIG
public static final java.lang.String BUFFER_MEMORY_CONFIG
buffer.memory
- See Also:
- Constant Field Values
-
RETRY_BACKOFF_MS_CONFIG
public static final java.lang.String RETRY_BACKOFF_MS_CONFIG
retry.backoff.ms
- See Also:
- Constant Field Values
-
COMPRESSION_TYPE_CONFIG
public static final java.lang.String COMPRESSION_TYPE_CONFIG
compression.type
- See Also:
- Constant Field Values
-
METRICS_ENABLED_CONFIG
public static final java.lang.String METRICS_ENABLED_CONFIG
metrics.enabled
- See Also:
- Constant Field Values
-
METRICS_SAMPLE_WINDOW_MS_CONFIG
public static final java.lang.String METRICS_SAMPLE_WINDOW_MS_CONFIG
metrics.sample.window.ms
- See Also:
- Constant Field Values
-
METRICS_NUM_SAMPLES_CONFIG
public static final java.lang.String METRICS_NUM_SAMPLES_CONFIG
metrics.num.samples
- See Also:
- Constant Field Values
-
METRICS_RECORDING_LEVEL_CONFIG
public static final java.lang.String METRICS_RECORDING_LEVEL_CONFIG
metrics.recording.level
- See Also:
- Constant Field Values
-
METRIC_REPORTER_CLASSES_CONFIG
public static final java.lang.String METRIC_REPORTER_CLASSES_CONFIG
metric.reporters
- See Also:
- Constant Field Values
-
MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION
public static final java.lang.String MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION
max.in.flight.requests.per.connection
- See Also:
- Constant Field Values
-
RETRIES_CONFIG
public static final java.lang.String RETRIES_CONFIG
retries
- See Also:
- Constant Field Values
-
KEY_SERIALIZER_CLASS_CONFIG
public static final java.lang.String KEY_SERIALIZER_CLASS_CONFIG
key.serializer
- See Also:
- Constant Field Values
-
KEY_SERIALIZER_CLASS_DOC
public static final java.lang.String KEY_SERIALIZER_CLASS_DOC
- See Also:
- Constant Field Values
-
VALUE_SERIALIZER_CLASS_CONFIG
public static final java.lang.String VALUE_SERIALIZER_CLASS_CONFIG
value.serializer
- See Also:
- Constant Field Values
-
VALUE_SERIALIZER_CLASS_DOC
public static final java.lang.String VALUE_SERIALIZER_CLASS_DOC
- See Also:
- Constant Field Values
-
CONNECTIONS_MAX_IDLE_MS_CONFIG
public static final java.lang.String CONNECTIONS_MAX_IDLE_MS_CONFIG
connections.max.idle.ms
- See Also:
- Constant Field Values
-
PARTITIONER_CLASS_CONFIG
public static final java.lang.String PARTITIONER_CLASS_CONFIG
partitioner.class
- See Also:
- Constant Field Values
-
INTERCEPTOR_CLASSES_CONFIG
public static final java.lang.String INTERCEPTOR_CLASSES_CONFIG
interceptor.classes
- See Also:
- Constant Field Values
-
INTERCEPTOR_CLASSES_DOC
public static final java.lang.String INTERCEPTOR_CLASSES_DOC
- See Also:
- Constant Field Values
-
ENABLE_IDEMPOTENCE_CONFIG
public static final java.lang.String ENABLE_IDEMPOTENCE_CONFIG
enable.idempotence
- See Also:
- Constant Field Values
-
ENABLE_IDEMPOTENCE_DOC
public static final java.lang.String ENABLE_IDEMPOTENCE_DOC
- See Also:
- Constant Field Values
-
TRANSACTION_TIMEOUT_CONFIG
public static final java.lang.String TRANSACTION_TIMEOUT_CONFIG
transaction.timeout.ms
- See Also:
- Constant Field Values
-
TRANSACTION_TIMEOUT_DOC
public static final java.lang.String TRANSACTION_TIMEOUT_DOC
- See Also:
- Constant Field Values
-
TRANSACTIONAL_ID_CONFIG
public static final java.lang.String TRANSACTIONAL_ID_CONFIG
transactional.id
- See Also:
- Constant Field Values
-
TRANSACTIONAL_ID_DOC
public static final java.lang.String TRANSACTIONAL_ID_DOC
- See Also:
- Constant Field Values
-
SECURITY_PROVIDERS_CONFIG
public static final java.lang.String SECURITY_PROVIDERS_CONFIG
security.providers
- See Also:
- Constant Field Values
-
STREAMS_RPC_TIMEOUT_MS_CONFIG
public static final java.lang.String STREAMS_RPC_TIMEOUT_MS_CONFIG
streams.rpc.timeout.ms
- See Also:
- Constant Field Values
-
STREAMS_HARDMOUNT_CONFIG
public static final java.lang.String STREAMS_HARDMOUNT_CONFIG
fs.mapr.hardmount
- See Also:
- Constant Field Values
-
STREAMS_BUFFER_TIME_CONFIG
public static final java.lang.String STREAMS_BUFFER_TIME_CONFIG
streams.buffer.max.time.ms
- See Also:
- Constant Field Values
-
STREAMS_PARALLEL_FLUSHERS_PER_PARTITION_CONFIG
public static final java.lang.String STREAMS_PARALLEL_FLUSHERS_PER_PARTITION_CONFIG
streams.parallel.flushers.per.partition
- See Also:
- Constant Field Values
-
STREAMS_PARTITIONER_CLASS_CONFIG
public static final java.lang.String STREAMS_PARTITIONER_CLASS_CONFIG
streams.partitioner.class
- See Also:
- Constant Field Values
-
STREAMS_PRODUCER_DEFAULT_STREAM_CONFIG
public static final java.lang.String STREAMS_PRODUCER_DEFAULT_STREAM_CONFIG
streams.producer.default.stream
- See Also:
- Constant Field Values
-
-
Method Detail
-
postProcessParsedConfig
protected java.util.Map<java.lang.String,java.lang.Object> postProcessParsedConfig(java.util.Map<java.lang.String,java.lang.Object> parsedValues)
Description copied from class:AbstractConfig
Called directly after user configs got parsed (and thus default values got set). This allows to change default values for "secondary defaults" if required.- Overrides:
postProcessParsedConfig
in classAbstractConfig
- Parameters:
parsedValues
- unmodifiable map of current configuration- Returns:
- a map of updates that should be applied to the configuration (will be validated to prevent bad updates)
-
addSerializerToConfig
public static java.util.Map<java.lang.String,java.lang.Object> addSerializerToConfig(java.util.Map<java.lang.String,java.lang.Object> configs, Serializer<?> keySerializer, Serializer<?> valueSerializer)
-
addSerializerToConfig
public static java.util.Properties addSerializerToConfig(java.util.Properties properties, Serializer<?> keySerializer, Serializer<?> valueSerializer)
-
configNames
public static java.util.Set<java.lang.String> configNames()
-
configDef
public static ConfigDef configDef()
-
main
public static void main(java.lang.String[] args)
-
-