Kafka Client Bookmarks

Published: 2020-07-16, Updated: 2020-07-16

Create kafka topics programatically

compile group: 'org.apache.kafka', name: 'kafka-clients', version: '2.5.0'

roperties properties = new Properties();
properties.put("bootstrap.servers", "localhost:9092");
properties.put("connections.max.idle.ms", 10000);
properties.put("request.timeout.ms", 5000);
final AdminClient adminClient = AdminClient.create(properties);

final CreateTopicsResult result = adminClient.createTopics(Arrays.asList(
  new NewTopic("some-topic", 10, (short) 1)
));

result.all().get();
System.out.println(result);

kafka client commands, kafka commands


Conectar fone bluetooth na linha de comando do linux Setup keyboard layout on Linux

Comments