[ https://issues.apache.org/jira/browse/KAFKA-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047141#comment-15047141 ]
Jason Gustafson commented on KAFKA-2961: ---------------------------------------- [~eljefe6a] I agree it's slightly annoying when you're subscribing to a single topic, but the point of using a list was to suggest that subscribe() is not additive and each call replaces the previous subscription. It's debatable whether it achieves that, but I think it might be even less clear if we also added subscribe(String). > Add a Single Topic KafkaConsumer Helper Function > ------------------------------------------------ > > Key: KAFKA-2961 > URL: https://issues.apache.org/jira/browse/KAFKA-2961 > Project: Kafka > Issue Type: Bug > Components: consumer > Affects Versions: 0.9.0.0 > Reporter: Jesse Anderson > Assignee: Neha Narkhede > > To subscribe to a single topic, you need to write more code than you should: > consumer.subscribe(Arrays.asList(topic)); > There should be a helper function to pass in a single topic to subscribe on. > Like this: > consumer.subscribe(topic); -- This message was sent by Atlassian JIRA (v6.3.4#6332)