[ 
https://issues.apache.org/jira/browse/KAFKA-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047489#comment-15047489
 ] 

Jason Gustafson commented on KAFKA-2961:
----------------------------------------

We previously discussed changing it to setSubscription() or a similar 
alternative, but I think we preferred subscribe() for its conciseness even 
though it may not be as suggestive of its semantics as we would have liked. 
Since the API is already public in 0.9, my preference is probably to keep it as 
it is since calling Arrays.asList() or Collections.singletonList() seems like 
only a small annoyance. What do you think?

> 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)

Reply via email to