doujiang24 / lua-resty-kafka

Lua kafka client driver for the Openresty based on the cosocket API
BSD 3-Clause "New" or "Revised" License
802 stars 275 forks source link

kafka throws an exception #23

Open loujianpeng opened 8 years ago

loujianpeng commented 8 years ago

java.lang.IllegalArgumentException: A metric named 'MetricName [name=throttle-time, group=Produce, description=Tracking average throttle-time per client, tags={client-id=worker:26556}]' already exists, can't register another one

loujianpeng commented 8 years ago

My code always use the same Produce Object

doujiang24 commented 8 years ago

@loujianpeng Sorry, I don't have time to look inside the kafka for now. Does Kafka alway throws this exception, or only for sometimes?

loujianpeng commented 8 years ago

@doujiang24 When Produce send message Kafka alway throws this exception, and message not lost.

hyperlink commented 8 years ago

My co-worker ran the same issue. Remove the colon : character from your client-id.

loujianpeng commented 8 years ago

what do you mean. can u help me

hyperlink commented 8 years ago

Kafka only allows ASCII alphanumerics (and . - _ chars as well) as the client-id