Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4629

Per topic MBeans leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.10.0.1
    • None
    • metrics
    • None

    Description

      Hi,

      In our application we create and delete topics dynamically. Most of the times when a topic is deleted the related MBeans are not deleted. Example of MBean: kafka.server:type=BrokerTopicMetrics,name=TotalProduceRequestsPerSec,topic=dw_06b5f828-e452-4e22-89c9-67849a65603d

      Also, deleting a topic often produces (what I think is) noise in the logs at WARN level. One example is:
      WARN PartitionStateMachine$DeleteTopicsListener:83 - [DeleteTopicsListener on 1]: Ignoring request to delete non-existing topics dw_fe8ff14b-aa9b-4f24-9bc1-6fbce15d20d2

      Easy reproducible with a basic Kafka cluster with two brokers, just create and delete topics few times. Sometimes the MBeans for the topic are deleted and sometimes are not.

      I'm creating and deleting topics using the AdminUtils class in the Java API:
      AdminUtils.deleteTopic(zkUtils, topicName);
      AdminUtils.createTopic(zkUtils, topicName, partitions, replicationFactor, topicConfiguration, kafka.admin.RackAwareMode.Enforced$.MODULE$);

      Kafka version: 0.10.0.1 (haven't tried other versions)

      Thanks,
      Alberto

      Attachments

        Activity

          People

            Unassigned Unassigned
            alberto.forti@natwestmarkets.com Alberto Forti
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: