You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Paolo Patierno <pp...@live.com> on 2017/07/27 09:47:27 UTC

About "exclude.internal.topics" ... some thoughts

Hi devs,


I noticed that the "exclude.internal.topics" consumer property has an effect only if the consumer subscribes specifying a "topic pattern" and not a topic name directly.

Of course if I run something like the console consumer passing "--topic __consumer_offsets", setting the above property does have no effect, you'll see messages sent to the internal __consumer_offsets topic. If you run same application using the "--whitelist" option then the property has its effect. We know that the difference is that passing --topic call a subscribe on specific topic name while passing --whitelist call a subscribe for a topic pattern.


Said that, the following comment on top of OffsetMessageFormatter class is misleading in my opinion :


"Consumer should also set exclude.internal.topics to false"


The same in the documentation about the property :


"Whether records from internal topics (such as offsets) should be exposed to the consumer. If set to true the only way to receive records from an internal topic is subscribing to it."


At least I would change in "... topic is subscribing directly to it." or something that explains the difference between subscribing using a topic filter (so the property takes an effect) or direct topic name (property does have no effect).


What do you think ?


Thanks,

Paolo.


Paolo Patierno
Senior Software Engineer (IoT) @ Red Hat
Microsoft MVP on Windows Embedded & IoT
Microsoft Azure Advisor

Twitter : @ppatierno<http://twitter.com/ppatierno>
Linkedin : paolopatierno<http://it.linkedin.com/in/paolopatierno>
Blog : DevExperience<http://paolopatierno.wordpress.com/>