Skip to content

NAME - Kafka debug commands



Kafka debug commands


COMMAND must include exactly one action: --list, --describe, --create, --alter or --delete.

  • --alter

    • Alter the number of partitions, replica assignment, and/or configuration for the topic.
  • --config NAME=VALUE

    • A topic configuration override for the topic being created or altered.The following is a list of valid configurations: cleanup.policy, compression.type,,, flush.messages,, follower.replication.throttled.replicas, index.interval.bytes, leader.replication.throttled.replicas, max.message.bytes, message.format.version,, message.timestamp.type, min.cleanable.dirty.ratio,, min.insync.replicas, preallocate, retention.bytes,, segment.bytes, segment.index.bytes,,, unclean.leader.election.enable. See the Kafka documentation for full details on the topic configs.
  • --create

    • Create a new topic.
  • --delete

    • Delete a topic
  • --delete-config NAME

    • A topic configuration override to be removed for an existing topic (see the list of configurations under the --config option).
  • --describe

    • List details for the given topics.
  • --disable-rack-aware

    • Disable rack aware replica assignment.
  • --force

    • Suppress console prompts.
  • --help

    • Print usage information.
  • --if-exists

    • if set when altering or deleting topics, the action will only execute if the topic exists.
  • --if-not-exists

    • if set when creating topics, the action will only execute if the topic does not already exist.
  • --list

    • List all available topics.
  • --partitions NUMBER

    • The number of partitions for the topic being created or altered (WARNING: If partitions are increased for a topic that has a key, the partition logic or ordering of the messages will be affected.
  • --replica-assignment broker_id_for_part1_replica1:broker_ id_for_part1_replica2,broker_id_for_part2_replica1:broker_id_for_part2_replica2,...

    • A list of manual partition-to-broker assignments for the topic being created or altered.
  • --replication-factor FACTOR

    • The replication factor for each partition in the topic being created.
  • --topic TOPIC_NAME

    • The topic to be create, alter or describe. Can also accept a regular expression except for --create option.
  • --topics-with-overrides

    • if set when describing topics, only show topics that have overridden configs
  • --unavailable-partitions

    • if set when describing topics, only show partitions whose leader is not available
  • --under-replicated-partitions

    • if set when describing topics, only show under replicated partitions
  • --zookeeper URL

    • The connection string for the zookeeper connection in the form host:port. Multiple URLS can be given to allow fail-over.


    • This json file defines the punchplatform settings. It is used by primarily to know the broker list.


  • Create a topic:
1 --create --topic test-topic --partitions 1 --replication-factor 1
  • Add partition to an existing topic
1 --kafkaCluster CLUSTER --topic TOPIC_NAME --alter --partitions 4
  • Change retention settings
2 --kafkaCluster CLUSTER --topic TOPIC_NAME --alter --config retention.bytes=NNNNNNNNNNN --kafkaCluster CLUSTER --topic TOPIC_NAME --alter --config


punchplatform-kafka-consumers punchplatform-env