Este conteúdo não está disponível no idioma selecionado.

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

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo