Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARN Error while fetching metadata with correlation id 1 : {MY_TOPIC?=INVALID_TOPIC_EXCEPTION} (org.apache.kafka.clients.NetworkClient)

When I run the following command with kafka 0.9.0.1, I get these warnings[1]. Can you please tell me what is wrong with my topics? (I'm talking to the kafka broker which runs in ec2)

./kafka-console-consumer.sh --new-consumer --bootstrap-server kafka.xx.com:9092 --topic MY_TOPIC?

[1]

[2016-04-06 10:57:45,839] WARN Error while fetching metadata with correlation id 1 : {MY_TOPIC?=INVALID_TOPIC_EXCEPTION} (org.apache.kafka.clients.NetworkClient)
[2016-04-06 10:57:46,066] WARN Error while fetching metadata with correlation id 3 : {MY_TOPIC?=INVALID_TOPIC_EXCEPTION} (org.apache.kafka.clients.NetworkClient)
[2016-04-06 10:57:46,188] WARN Error while fetching metadata with correlation id 5 : {MY_TOPIC?=INVALID_TOPIC_EXCEPTION} (org.apache.kafka.clients.NetworkClient)
[2016-04-06 10:57:46,311] WARN Error while fetching metadata with correlation id 7 : {MY_TOPIC?=INVALID_TOPIC_EXCEPTION} (org.apache.kafka.clients.NetworkClient)
like image 699
Ratha Avatar asked Apr 06 '16 01:04

Ratha


2 Answers

You topic name is not valid because it has character '?' which is not legalCharacter for topic names.

like image 76
avr Avatar answered Nov 16 '22 08:11

avr


I got same error. in my case problem was space between comma separated topics in my code:

@source(type='kafka',
    topic.list="p1, p2, p3",
    partition.no.list='0',
    threading.option='single.thread',
    group.id="group",
    bootstrap.servers='kafka:9092',
    @map(type='json')
)

finally find solution:

@source(type='kafka',
    topic.list="p1,p2,p3",
    partition.no.list='0',
    threading.option='single.thread',
    group.id="group",
    bootstrap.servers='kafka:9092',
    @map(type='json')
)
like image 20
mortezahosseini Avatar answered Nov 16 '22 07:11

mortezahosseini