{"action":"created","issue":{"url":"https://api.github.com/repos/salesforce/kafka-junit/issues/20","repository_url":"https://api.github.com/repos/salesforce/kafka-junit","labels_url":"https://api.github.com/repos/salesforce/kafka-junit/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/salesforce/kafka-junit/issues/20/comments","events_url":"https://api.github.com/repos/salesforce/kafka-junit/issues/20/events","html_url":"https://github.com/salesforce/kafka-junit/issues/20","id":348794533,"node_id":"MDU6SXNzdWUzNDg3OTQ1MzM=","number":20,"title":"Subscribe method of KafkaConsumer is not supported?","user":{"login":"AleMetelli","id":10196238,"node_id":"MDQ6VXNlcjEwMTk2MjM4","avatar_url":"https://avatars3.githubusercontent.com/u/10196238?v=4","gravatar_id":"","url":"https://api.github.com/users/AleMetelli","html_url":"https://github.com/AleMetelli","followers_url":"https://api.github.com/users/AleMetelli/followers","following_url":"https://api.github.com/users/AleMetelli/following{/other_user}","gists_url":"https://api.github.com/users/AleMetelli/gists{/gist_id}","starred_url":"https://api.github.com/users/AleMetelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AleMetelli/subscriptions","organizations_url":"https://api.github.com/users/AleMetelli/orgs","repos_url":"https://api.github.com/users/AleMetelli/repos","events_url":"https://api.github.com/users/AleMetelli/events{/privacy}","received_events_url":"https://api.github.com/users/AleMetelli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-08T16:11:47Z","updated_at":"2018-11-16T14:40:52Z","closed_at":"2018-08-13T01:19:55Z","author_association":"NONE","body":"I have developed a kafka-consumer application and I'm using kafka-junit4 to test my application.\r\n\r\nI noticed the following thing:\r\n\r\n- Tests work if I assign topic partition manually\r\n\r\n`public ConsumerThread(BiConsumer<K, V> processor, Properties properties, String topics)  {\r\n\t\tthis.processor = processor;\r\n\t\tthis.consumer = new KafkaConsumer<>(properties);\r\n\t\tTopicPartition partition = new TopicPartition(topics, 0);\r\n\t\tthis.consumer.assign(Arrays.asList(partition));\r\n\t\tthis.consumer.seekToBeginning(Arrays.asList(partition));\r\n}` \r\n\r\n- Tests NOT work if I assign topic partition dynamically with subscribe method\r\n\r\n`public ConsumerThread(BiConsumer<K, V> processor, Properties properties, String topics) {\r\n\t\tthis.processor = processor;\r\n\t\tthis.consumer = new KafkaConsumer<>(properties);\r\n\t\tthis.consumer.subscribe(Arrays.asList(topics));\r\n}`\r\n\r\nIn this case nothing partitions are assigned at the consumer.\r\n\r\nIs this a known issue?\r\nAre there any solutions? \r\n\r\nThanks for you support."},"comment":{"url":"https://api.github.com/repos/salesforce/kafka-junit/issues/comments/439413505","html_url":"https://github.com/salesforce/kafka-junit/issues/20#issuecomment-439413505","issue_url":"https://api.github.com/repos/salesforce/kafka-junit/issues/20","id":439413505,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTQxMzUwNQ==","user":{"login":"xeymericx","id":5575629,"node_id":"MDQ6VXNlcjU1NzU2Mjk=","avatar_url":"https://avatars0.githubusercontent.com/u/5575629?v=4","gravatar_id":"","url":"https://api.github.com/users/xeymericx","html_url":"https://github.com/xeymericx","followers_url":"https://api.github.com/users/xeymericx/followers","following_url":"https://api.github.com/users/xeymericx/following{/other_user}","gists_url":"https://api.github.com/users/xeymericx/gists{/gist_id}","starred_url":"https://api.github.com/users/xeymericx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeymericx/subscriptions","organizations_url":"https://api.github.com/users/xeymericx/orgs","repos_url":"https://api.github.com/users/xeymericx/repos","events_url":"https://api.github.com/users/xeymericx/events{/privacy}","received_events_url":"https://api.github.com/users/xeymericx/received_events","type":"User","site_admin":false},"created_at":"2018-11-16T14:40:52Z","updated_at":"2018-11-16T14:40:52Z","author_association":"NONE","body":"Hello,\r\n\r\nI am currently having the same issue even with the \r\nproperties.put(\"auto.offset.reset\", \"earliest\");\r\n\r\nThank you."}}
{"actor":{"display_login":"xeymericx"}}