public class ByteArrayProducer extends org.apache.kafka.clients.producer.KafkaProducer<String,byte[]>
Constructor and Description |
---|
ByteArrayProducer(Map<String,Object> configs)
A producer is instantiated by providing a set of key-value pairs
as configuration.
|
ByteArrayProducer(Map<String,Object> configs,
org.apache.kafka.common.serialization.Serializer<String> keySerializer,
org.apache.kafka.common.serialization.Serializer<byte[]> valueSerializer)
A producer is instantiated by providing a set of key-value pairs
as configuration, a key and a value
Serializer .
|
ByteArrayProducer(Properties properties)
A producer is instantiated by providing a set of key-value pairs
as configuration.
|
ByteArrayProducer(Properties properties,
org.apache.kafka.common.serialization.Serializer<String> keySerializer,
org.apache.kafka.common.serialization.Serializer<byte[]> valueSerializer)
A producer is instantiated by providing a set of key-value pairs
as configuration, a key and a value
Serializer .
|
public ByteArrayProducer(Map<String,Object> configs)
configs
- The producer configspublic ByteArrayProducer(Map<String,Object> configs, org.apache.kafka.common.serialization.Serializer<String> keySerializer, org.apache.kafka.common.serialization.Serializer<byte[]> valueSerializer)
Serializer
.
Valid configuration strings are documented here.
Values can be either strings or Objects of the appropriate type (for example a
numeric configuration would accept
either the string "42" or the integer 42).
configs
- The producer configskeySerializer
- The serializer for key that implements Serializer
.
The configure() method won't be
called in the producer when the serializer is passed in directly.
valueSerializer
- The serializer for value that implements Serializer
.
The configure() method won't
public ByteArrayProducer(Properties properties)
properties
- The producer configspublic ByteArrayProducer(Properties properties, org.apache.kafka.common.serialization.Serializer<String> keySerializer, org.apache.kafka.common.serialization.Serializer<byte[]> valueSerializer)
Serializer
.
Valid configuration strings are documented here.
properties
- The producer configskeySerializer
- The serializer for key that implements Serializer
.
The configure() method won't be
called in the producer when the serializer is passed in directly.
valueSerializer
- The serializer for value that implements Serializer
.
The configure() method won't