Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 16. Using Cruise Control to modify topic replication factor


Make requests to the /topic_configuration endpoint of the Cruise Control REST API to modify topic configurations, including the replication factor.

Prerequisites

Procedure

  1. Start the Cruise Control server. The server starts on port 9092 by default; optionally, specify a different port.

    cd ./cruise-control/
    ./kafka-cruise-control-start.sh config/cruisecontrol.properties <port_number>
  2. To verify that Cruise Control is running, send a GET request to the /state endpoint of the Cruise Control server:

    curl -X GET 'http://<cc_host>:<cc_port>/kafkacruisecontrol/state'
  3. Run the bin/kafka-topics.sh command with the --describe option to check the current replication factor of the target topic:

    ./bin/kafka-topics.sh \
      --bootstrap-server localhost:9092 \
      --topic <topic_name> \
      --describe
  4. Update the replication factor for the topic:

    curl -X POST 'http://<cc_host>:<cc_port>/kafkacruisecontrol/topic_configuration?topic=<topic_name>&replication_factor=<new_replication_factor>&dryrun=false'

    For example, curl -X POST 'localhost:9090/kafkacruisecontrol/topic_configuration?topic=topic1&replication_factor=3&dryrun=false'.

  5. Run the bin/kafka-topics.sh command with the --describe option, as before, to see the results of the change to the topic.
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2026 Red Hat
Nach oben