Adapter commands for producers

Kafka adapter commands for producers are valid for output target data. For additional details, see the producer configuration information in the Apache Kafka documentation.

Acknowledgments Level

Specifies the level of acknowledgment required for message delivery to be considered successful. The corresponding adapter command is -ACK level (or -ACKNOWLEDGEMENTS level). The default acknowledgment level is 1.

0: No acknowledgment required. At this acknowledgment level, the -RET command is applicable.

1: Acknowledgment is required from the leader broker only.

-1

All: Acknowledgment is required from the leader broker and all replica brokers.

Related Kafka producer configuration: acks

Buffer Memory

Specifies the maximum amount of memory, in bytes, that the producer uses to buffer records that are queued to be sent to the server. The default buffer size is 33,554,432. The corresponding adapter command is -BM bytes (-BUFFERMEMORY bytes).

Related Kafka producer configuration: buffer.memory

Batch Size

The default size, in bytes, of a group of records being sent to the same partition in a single request. When a batch of records reaches this size, the producer sends the batch (regardless of the -LM setting). Records that exceed this size are sent immediately. The corresponding adapter command is -BS bytes (or -BATCHSIZE bytes).

A single publish operation sends multiple record batches: one batch for each partition on the server that the producer has data for.

The default batch size is 16384.

Related Kafka producer configuration: batch.size

Linger Milliseconds

Specifies the amount of time, in milliseconds, that the producer waits for additional records to arrive in order to batch the records. The default is 0 ms, meaning no delay. The corresponding adapter command is -LM ms (or -LINGERMILLISECONDS ms).

Related Kafka producer configuration: linger.ms

Compression Type

Specifies the compression type for full batches of data generated by the producer. The default is none. The corresponding adapter command is -CT {none | gzip | snappy | lz4} (or -COMPRESSIONTYPE {none | gzip | snappy | lz4}).

Related Kafka producer configuration: compression.type

Retries Count

Specifies the number of times the producer attempts to resend a message, in case the broker reports a transient error. The range of retries is 0 - 2147483647. The default is 0 retries. The corresponding adapter command is -RET count (or -RETRIES count).

Related Kafka producer configuration: retries

Enables Idempotence

Enables idempotence. Idempotent delivery ensures that messages are delivered exactly once to a particular topic partition during the lifetime of a single producer. The corresponding adapter command is -El (or -ENABLEIDEMPOTENCE). When you specify this command:
  • The retry count (-RET command) must be greater than zero.
  • The acknowledgment level (-ACK command) must be -1 or all.

Otherwise, a configuration exception occurs.

Related Kafka producer configuration: enable.idempotence

Transactional ID

Enables transactional delivery. Together with idempotence (-EI command), allows producers to send data to multiple partitions so that either all messages are successfully delivered, or none of them are.

The corresponding adapter command is -TID transactionalID (or -TRANSACTIONALID transactionalID).

Related Kafka producer configuration: transactional.id

JSON Avro Decoder Class Name

Specifies the Java class to use for converting JSON to Avro representation. This command is optional and if not specified the default class org.apache.avro.io.JsonDecoder is used. When specified, the provided value must be a fully qualified name of the Java class that implements a public constructor which takes two arguments: org.apache.avro.Schema which represents the Avro schema to use for the conversion and java.io.InputStream which represents the stream from which to read JSON content. The jar file that implements this class must be included in the classpath in use for the adapter.

The corresponding adapter command is -JADCN name (or -JSONAVRODECODERCLASSNAME name).