Update apache-kafka-2/src/test/java/com/baeldung/kafka/message/ordering/ExtSeqWithTimeWindowIntegrationTest.java
Co-authored-by: Liam Williams <liam.williams@zoho.com>
This commit is contained in:
parent
1394665355
commit
c2453a503f
|
@ -62,18 +62,7 @@ public class ExtSeqWithTimeWindowIntegrationTest {
|
|||
admin = Admin.create(adminProperties);
|
||||
producer = new KafkaProducer<>(producerProperties);
|
||||
consumer = new KafkaConsumer<>(consumerProperties);
|
||||
List<NewTopic> topicList = new ArrayList<>();
|
||||
NewTopic newTopic = new NewTopic(Config.MULTI_PARTITION_TOPIC, Config.MULTIPLE_PARTITIONS, Config.REPLICATION_FACTOR);
|
||||
topicList.add(newTopic);
|
||||
CreateTopicsResult result = admin.createTopics(topicList);
|
||||
KafkaFuture<Void> future = result.values().get(Config.MULTI_PARTITION_TOPIC);
|
||||
future.whenComplete((voidResult, exception) -> {
|
||||
if (exception != null) {
|
||||
System.err.println("Error creating the topic: " + exception.getMessage());
|
||||
} else {
|
||||
System.out.println("Topic created successfully!");
|
||||
}
|
||||
}).get();
|
||||
admin.createTopics(ImmutableList.of(new NewTopic(Config.MULTI_PARTITION_TOPIC, Config.MULTIPLE_PARTITIONS, Config.REPLICATION_FACTOR))).all().get();
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
|
|
Loading…
Reference in New Issue