BAEL-3185: Fixed container factory for partition listener

This commit is contained in:
Sorin Zamfir 2020-02-27 22:12:39 +02:00
parent c2ac76bc83
commit 16b8a61b16
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ public class KafkaApplication {
latch.countDown();
}
@KafkaListener(topicPartitions = @TopicPartition(topic = "${partitioned.topic.name}", partitions = { "0", "3" }))
@KafkaListener(topicPartitions = @TopicPartition(topic = "${partitioned.topic.name}", partitions = { "0", "3" }), containerFactory = "partitionsKafkaListenerContainerFactory")
public void listenToParition(@Payload String message, @Header(KafkaHeaders.RECEIVED_PARTITION_ID) int partition) {
System.out.println("Received Message: " + message + " from partition: " + partition);
this.partitionLatch.countDown();