private static List < String > getTopics ( List < KafkaTopicPartitionState < TopicAndPartition > > partitions ) { HashSet < String > uniqueTopics = new HashSet <> ( ) ; for ( KafkaTopicPartitionState < TopicAndPartition > fp : partitions ) { uniqueTopics . add ( fp . getTopic ( ) ) ; } return new ArrayList <> ( uniqueTopics ) ; }
Returns a list of unique topics from for the given partitions .