I have just attached the log below
13:19:05.140 [main] DEBUG o.apache.kafka.clients.NetworkClient - Completed connection to node 2147483647 13:19:05.222 [main] DEBUG o.a.k.c.c.i.AbstractCoordinator - Joined group: {error_code=0,generation_id=1,group_protocol=range,leader_id=consumer-1-e1dc2555-6249-4762-9afe-2c4e6ca789eb,member_id=consumer-1-e1dc2555-6249-4762-9afe-2c4e6ca789eb,members=[{member_id=consumer-1-e1dc2555-6249-4762-9afe-2c4e6ca789eb,member_metadata=java.nio.HeapByteBuffer[pos=0 lim=16 cap=16]}]} 13:19:05.223 [main] DEBUG o.a.k.c.c.i.ConsumerCoordinator - Performing range assignment for subscriptions {consumer-1-e1dc2555-6249-4762-9afe-2c4e6ca789eb=org.apache.kafka.clients.consumer.internals.PartitionAssignor$Subscription@55141def } 13:19:05.225 [main] DEBUG o.a.k.c.c.i.ConsumerCoordinator - Finished assignment: {consumer-1-e1dc2555-6249-4762-9afe-2c4e6ca789eb=org.apache.kafka.clients.consumer.internals.PartitionAssignor$Assignment@5656be13 } 13:19:05.227 [main] DEBUG o.a.k.c.c.i.AbstractCoordinator - Issuing leader SyncGroup (SYNC_GROUP: {group_id=consumer-tutorial,generation_id=1,member_id=consumer-1-e1dc2555-6249-4762-9afe-2c4e6ca789eb,group_assignment=[{member_id=consumer-1-e1dc2555-6249-4762-9afe-2c4e6ca789eb,member_assignment=java.nio.HeapByteBuffer[pos=0 lim=24 cap=24]}]}) to coordinator 2147483647 13:19:05.317 [main] DEBUG o.a.k.c.c.i.AbstractCoordinator - Received successful sync group response for group consumer-tutorial: {error_code=0,member_assignment=java.nio.HeapByteBuffer[pos=0 lim=24 cap=24]} 13:19:05.321 [main] DEBUG o.a.k.c.c.i.ConsumerCoordinator - Setting newly assigned partitions [test-0] 13:19:05.322 [main] DEBUG o.a.k.c.c.i.ConsumerCoordinator - Fetching committed offsets for partitions: [test-0] 13:19:05.404 [main] DEBUG o.a.k.c.c.i.ConsumerCoordinator - No committed offset for partition test-0 13:19:05.405 [main] DEBUG o.a.k.c.consumer.internals.Fetcher - Resetting offset for partition test-0 to latest offset. 13:19:05.491 [main] DEBUG o.a.k.c.consumer.internals.Fetcher - Fetched offset 7 for partition test-0 On Thu, Apr 21, 2016 at 1:18 PM, Yogesh BG <yogesh...@gmail.com> wrote: > I have a kafka consumer as below, i could able to see the messages on > console, if i go and run on the same machine. but am not able to get the > records here, what could be the problem. Previously i had tried with kafka > some days before it used to work as expected. here also i am able to get > partition info etc but not records. > {tes2=[Partition(topic = tes2, partition = 0, leader = 0, replicas = [0,], > isr = [0,]], elnetty-items=[Partition(topic = elnetty-items, partition = 1, > leader = 1, replicas = [1,2,], isr = [1,2,], Partition(topic = > elnetty-items, partition = 0, leader = 0, replicas = [0,1,], isr = [0,1,]], > __consumer_offsets=[Partition(topic = __consumer_offsets, partition = 23, > leader = 2, replicas = [2,1,0,], isr = [2,1,0,], Partition(topic = > __consumer_offsets, partition = 41, leader = 2, replicas = [2,1,0,], isr = > [2,1,0,], Partition(topic = __consumer_offsets, partition = 32, leader = 2, > replicas = [2,0,1,], isr = [2,0,1,], Partition(topic = __consumer_offsets, > partition = 8, leader = 2, replicas = [2,0,1,], isr = [2,0,1,], > Partition(topic = __consumer_offsets, partition = 44, leader = 2, replicas > = [2,0,1,], isr = [2,0,1,], Partition(topic = __consumer_offsets, partition > = 17, leader = 2, replicas = [2,1,0,], isr = [2,1,0,], Partition(topic = > __consumer_offsets, partition = 35, leader = 2, replicas = [2,1,0,], isr = > [2,1,0,], Partition(topic = __consumer_offsets, partition = 26, leader = 2, > replicas = [2,0,1,], isr = [2,0,1,], Partition(topic = __consumer_offsets, > partition = 11, leader = 2, replicas = [2,1,0,], isr = [2,1,0,], > Partition(topic = __consumer_offsets, partition = 38, leader = 2, replicas > = [2,0,1,], isr = [2,0,1,], Partition(topic = __consumer_offsets, partition > = 29, leader = 2, replicas = [2,1,0,], isr = [2,1,0,], Partition(topic = > __consumer_offsets, partition = 47, leader = 2, replicas = [2,1,0,], isr = > [2,1,0,], Partition(topic = __consumer_offsets, partition = 20, leader = 2, > replicas = [2,0,1,], isr = [2,0,1,], Partition(topic = __consumer_offsets, > partition = 2, leader = 2, replicas = [2,0,1,], isr = [2,0,1,], > Partition(topic = __consumer_offsets, partition = 5, leader = 2, replicas = > [2,1,0,], isr = [2,1,0,], Partition(topic = __consumer_offsets, partition = > 14, leader = 2, replicas = [2,0,1,], isr = [2,0,1,], Partition(topic = > __consumer_offsets, partition = 46, leader = 1, replicas = [1,0,2,], isr = > [1,0,2,], Partition(topic = __consumer_offsets, partition = 40, leader = 1, > replicas = [1,0,2,], isr = [1,0,2,], Partition(topic = __consumer_offsets, > partition = 49, leader = 1, replicas = [1,2,0,], isr = [1,2,0,], > Partition(topic = __consumer_offsets, partition = 13, leader = 1, replicas > = [1,2,0,], isr = [1,2,0,], Partition(topic = __consumer_offsets, partition > = 4, leader = 1, replicas = [1,0,2,], isr = [1,0,2,], Partition(topic = > __consumer_offsets, partition = 22, leader = 1, replicas = [1,0,2,], isr = > [1,0,2,], Partition(topic = __consumer_offsets, partition = 31, leader = 1, > replicas = [1,2,0,], isr = [1,2,0,], Partition(topic = __consumer_offsets, > partition = 16, leader = 1, replicas = [1,0,2,], isr = [1,0,2,], > Partition(topic = __consumer_offsets, partition = 7, leader = 1, replicas = > [1,2,0,], isr = [1,2,0,], Partition(topic = __consumer_offsets, partition = > 43, leader = 1, replicas = [1,2,0,], isr = [1,2,0,], Partition(topic = > __consumer_offsets, partition = 25, leader = 1, replicas = [1,2,0,], isr = > [1,2,0,], Partition(topic = __consumer_offsets, partition = 34, leader = 1, > replicas = [1,0,2,], isr = [1,0,2,], Partition(topic = __consumer_offsets, > partition = 10, leader = 1, replicas = [1,0,2,], isr = [1,0,2,], > Partition(topic = __consumer_offsets, partition = 37, leader = 1, replicas > = [1,2,0,], isr = [1,2,0,], Partition(topic = __consumer_offsets, partition > = 1, leader = 1, replicas = [1,2,0,], isr = [1,2,0,], Partition(topic = > __consumer_offsets, partition = 28, leader = 1, replicas = [1,0,2,], isr = > [1,0,2,], Partition(topic = __consumer_offsets, partition = 19, leader = 1, > replicas = [1,2,0,], isr = [1,2,0,], Partition(topic = __consumer_offsets, > partition = 45, leader = 0, replicas = [0,2,1,], isr = [0,2,1,], > Partition(topic = __consumer_offsets, partition = 36, leader = 0, replicas > = [0,1,2,], isr = [0,1,2,], Partition(topic = __consumer_offsets, partition > = 27, leader = 0, replicas = [0,2,1,], isr = [0,2,1,], Partition(topic = > __consumer_offsets, partition = 9, leader = 0, replicas = [0,2,1,], isr = > [0,2,1,], Partition(topic = __consumer_offsets, partition = 18, leader = 0, > replicas = [0,1,2,], isr = [0,1,2,], Partition(topic = __consumer_offsets, > partition = 21, leader = 0, replicas = [0,2,1,], isr = [0,2,1,], > Partition(topic = __consumer_offsets, partition = 48, leader = 0, replicas > = [0,1,2,], isr = [0,1,2,], Partition(topic = __consumer_offsets, partition > = 3, leader = 0, replicas = [0,2,1,], isr = [0,2,1,], Partition(topic = > __consumer_offsets, partition = 12, leader = 0, replicas = [0,1,2,], isr = > [0,1,2,], Partition(topic = __consumer_offsets, partition = 30, leader = 0, > replicas = [0,1,2,], isr = [0,1,2,], Partition(topic = __consumer_offsets, > partition = 39, leader = 0, replicas = [0,2,1,], isr = [0,2,1,], > Partition(topic = __consumer_offsets, partition = 15, leader = 0, replicas > = [0,2,1,], isr = [0,2,1,], Partition(topic = __consumer_offsets, partition > = 42, leader = 0, replicas = [0,1,2,], isr = [0,1,2,], Partition(topic = > __consumer_offsets, partition = 33, leader = 0, replicas = [0,2,1,], isr = > [0,2,1,], Partition(topic = __consumer_offsets, partition = 24, leader = 0, > replicas = [0,1,2,], isr = [0,1,2,], Partition(topic = __consumer_offsets, > partition = 6, leader = 0, replicas = [0,1,2,], isr = [0,1,2,], > Partition(topic = __consumer_offsets, partition = 0, leader = 0, replicas = > [0,1,2,], isr = [0,1,2,]]} > > public static void main(String[] args) { > Properties props = new Properties(); > props.put("bootstrap.servers", "IPPORT"); > props.put("group.id", "consumer-tutorial"); > props.put("key.deserializer", StringDeserializer.class.getName()); > props.put("value.deserializer", StringDeserializer.class.getName()); > KafkaConsumer<String, String> consumer = new KafkaConsumer<String, > String>(props); > ArrayList<String> arrayList = new ArrayList<String>(); > arrayList.add("test"); > consumer.subscribe(arrayList); > ConsumerRecords<String, String> poll = consumer.poll(1000); > Iterator<ConsumerRecord<String, String>> iterator = poll.iterator(); > while (iterator.hasNext()) { > ConsumerRecord<String, String> next = iterator.next(); > System.out.println(next); > > } > -- > Yogesh..BG > Senior Software engineer > Sling Media Pvt. Ltd. > PSS Plaza, #6, > Wind Tunnel Road. > Murghesh Palya, > Banglore - 560 017 > Contact no: 7760922118 > > -- Yogesh..BG Senior Software engineer Sling Media Pvt. Ltd. PSS Plaza, #6, Wind Tunnel Road. Murghesh Palya, Banglore - 560 017 Contact no: 7760922118