use of org.apache.kafka.common.serialization.ByteArraySerializer in project kafka by apache.
the class KafkaProducerTest method testConstructorWithSerializers.
@Test
public void testConstructorWithSerializers() {
Properties producerProps = new Properties();
producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9000");
new KafkaProducer<>(producerProps, new ByteArraySerializer(), new ByteArraySerializer()).close();
}
use of org.apache.kafka.common.serialization.ByteArraySerializer in project samza by apache.
the class StandaloneIntegrationTestHarness method setUp.
@Override
public void setUp() {
super.setUp();
producer = TestUtils.createNewProducer(bootstrapServers(), 1, 60 * 1000L, 1024L * 1024L, 0, 0L, 5 * 1000L, SecurityProtocol.PLAINTEXT, null, Option$.MODULE$.<Properties>apply(new Properties()), new StringSerializer(), new ByteArraySerializer(), Option$.MODULE$.<Properties>apply(new Properties()));
consumer = TestUtils.createNewConsumer(bootstrapServers(), "group", "earliest", 4096L, "org.apache.kafka.clients.consumer.RangeAssignor", 30000, SecurityProtocol.PLAINTEXT, Option$.MODULE$.<File>empty(), Option$.MODULE$.<Properties>empty(), Option$.MODULE$.<Properties>empty());
}
Aggregations