apache-kafkaoverhead

Does adding topics to subscribe to add overhead to communication


Does a publisher-subscribe model from Kafka add a communication overhead when we add topics to subscribe to on the publisher side compared to using no topics to subscribe to but publish messages and let any subscriber receives them without having to subscribe to a certain topic?


Solution

  • Topic names are matched against a regex pattern by the Kafka Controller, after which, the consumer must poll from all leader partitions from all topics it's subscribed to. Yes, there's extra overhead.

    Consumers must subscribe, and are not coupled with the producer, so not understanding second part of the question.