[jira] [Commented] (KAFKA-3800) java client can`t poll msg

2016-06-08 Thread Ewen Cheslack-Postava (JIRA)

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

Ewen Cheslack-Postava commented on KAFKA-3800:
--

[~frank_zg] Can you modify your code to loop and call poll repeatedly? You may 
simply not have received the data within the timeout you specified.

> java client can`t poll msg
> --
>
> Key: KAFKA-3800
> URL: https://issues.apache.org/jira/browse/KAFKA-3800
> Project: Kafka
>  Issue Type: Bug
>  Components: consumer
>Affects Versions: 0.9.0.1
> Environment: java8,win7 64
>Reporter: frank
>Assignee: Neha Narkhede
>
> i use hump topic name, after poll msg is null.eg: Test_4 why?
> all low char is ok. i`m try nodejs,kafka-console-consumers.bat is ok



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3800) java client can`t poll msg

2016-06-07 Thread frank (JIRA)

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

frank commented on KAFKA-3800:
--

i`m try this config.yet.the result is the same.curiously,same code,change topic 
to low char. consumer is ok.

> java client can`t poll msg
> --
>
> Key: KAFKA-3800
> URL: https://issues.apache.org/jira/browse/KAFKA-3800
> Project: Kafka
>  Issue Type: Bug
>  Components: consumer
>Affects Versions: 0.9.0.1
> Environment: java8,win7 64
>Reporter: frank
>Assignee: Neha Narkhede
>
> i use hump topic name, after poll msg is null.eg: Test_4 why?
> all low char is ok. i`m try nodejs,kafka-console-consumers.bat is ok



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3800) java client can`t poll msg

2016-06-07 Thread Ewen Cheslack-Postava (JIRA)

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

Ewen Cheslack-Postava commented on KAFKA-3800:
--

This code will only read new messages written after the program starts because 
the default consumer config that controls where to start reading data defaults 
to "latest" if there is no existing offset (i.e. when you first start a 
consumer and it doesn't know where to start reading it will start at *the end* 
of the log, after all the existing messages) 
http://docs.confluent.io/3.0.0/clients/javadocs/constant-values.html#org.apache.kafka.clients.consumer.ConsumerConfig.AUTO_OFFSET_RESET_DOC
 Maybe try adding

props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");

to the configuration and re-running (making sure to either change the group ID 
or making sure you're working from a brand new cluster since enable.auto.commit 
is also enabled by default, so if you ran this app once before, it has probably 
committed offsets already and will not attempt to reset based on the 
auto.offset.reset setting).

> java client can`t poll msg
> --
>
> Key: KAFKA-3800
> URL: https://issues.apache.org/jira/browse/KAFKA-3800
> Project: Kafka
>  Issue Type: Bug
>  Components: consumer
>Affects Versions: 0.9.0.1
> Environment: java8,win7 64
>Reporter: frank
>Assignee: Neha Narkhede
>
> i use hump topic name, after poll msg is null.eg: Test_4 why?
> all low char is ok. i`m try nodejs,kafka-console-consumers.bat is ok



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3800) java client can`t poll msg

2016-06-07 Thread frank (JIRA)

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

frank commented on KAFKA-3800:
--

i get kafka example on github. 
`Properties props = new Properties();
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, 
"192.168.0.180:9092");
props.put(ConsumerConfig.GROUP_ID_CONFIG, "test_group3");
props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, 
"org.apache.kafka.common.serialization.IntegerDeserializer");
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, 
"org.apache.kafka.common.serialization.StringDeserializer");

consumer = new KafkaConsumer(props);`

`public void doWork() {
System.out.println(this.topic);
consumer.subscribe(Collections.singletonList(this.topic));
ConsumerRecords records = consumer.poll(200);
for (ConsumerRecord record : records) {
System.out.println("Received message: (" + record.key() + ", " + 
record.value() + ") at offset " + record.offset());
}
}`

> java client can`t poll msg
> --
>
> Key: KAFKA-3800
> URL: https://issues.apache.org/jira/browse/KAFKA-3800
> Project: Kafka
>  Issue Type: Bug
>  Components: consumer
>Affects Versions: 0.9.0.1
> Environment: java8,win7 64
>Reporter: frank
>Assignee: Neha Narkhede
>
> i use hump topic name, after poll msg is null.eg: Test_4 why?
> all low char is ok. i`m try nodejs,kafka-console-consumers.bat is ok



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-3800) java client can`t poll msg

2016-06-07 Thread Ewen Cheslack-Postava (JIRA)

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

Ewen Cheslack-Postava commented on KAFKA-3800:
--

[~frank_zg] Can you provide more details about your code, what consumer 
configuration you're using, etc? What part of the message is null? Is this the 
new or old consumer? Did you use auto.offset.reset=earliest? If not, only new 
messages will be returned to the consumer.

> java client can`t poll msg
> --
>
> Key: KAFKA-3800
> URL: https://issues.apache.org/jira/browse/KAFKA-3800
> Project: Kafka
>  Issue Type: Bug
>  Components: consumer
>Affects Versions: 0.9.0.1
> Environment: java8,win7 64
>Reporter: frank
>Assignee: Neha Narkhede
>
> i use hump topic name, after poll msg is null.eg: Test_4 why?
> all low char is ok. i`m try nodejs,kafka-console-consumers.bat is ok



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)