Hi

I have an app that spins up multiple threads in a single JVM. Each thread has 
its own v9 consumer running under different groupIds.


Since they are part of the same application, I set the client.id property for 
all 3 consumers to "frylock".


Everything runs OK but I do see the following exception logged as a warning 
during startup:


2016-05-10 06:45:12,704 WARN [nioEventLoopGroup-3-3] 
org.apache.kafka.common.utils.AppInfoParser: Error registering AppInfo mbean

javax.management.InstanceAlreadyExistsException: 
kafka.consumer:type=app-info,id=frylock


>From what I can gather, this error occurs when the consumer tries to register 
>the metrics with JMX.


I also noticed that if I don't set client.id explicitly, the API will generate  
a unique client.id for each consumer.


So as far as the metrics are concerned, it seems like the API wants you to set 
client.id to a unique value for all consumers running in the same JVM.


At some point, I plan to make use of quotas. As I understand it, quotas are 
based on client.id. If so, it seems like the metrics handling in the consumer 
API is incompatible with quotas because for quotas to work, you would want all 
of the consumers that are part of the same app to use the same client.id (even 
if they are running in the same JVM).


For my application, quotas are more important so my plan is to set 
client.id=frylock for all consumers and then write-off/ignore the per client-id 
JMX beans since they are probably not accurate. I guess I can still get 
individual consumer metrics through the Consumer.metrics() if I need them.


Anyone have any better ideas? Am I missing something? Is this inconsistency 
worth filing a ticket over?


Thanks,

Paul

Reply via email to