All Products
Search
Document Center

ApsaraMQ for Kafka:What happens when you upgrade ApsaraMQ for Kafka brokers?

Last Updated:Mar 11, 2026

ApsaraMQ for Kafka remains available during a broker upgrade. The upgrade performs a rolling restart: brokers restart one at a time while the cluster continues to serve traffic. The entire process takes about 5 to 15 minutes.

Although the service is not interrupted, the rolling restart causes temporary effects that may affect your applications. These effects resolve automatically as the upgrade completes. Review the following impacts and preparation steps before you start the upgrade.

Temporary impacts during the upgrade

Message ordering

Messages consumed within 5 minutes after each broker restart may arrive out of order in specific partitions. This happens because partition leadership transfers between brokers during the rolling restart.

Note

Serverless ApsaraMQ for Kafka and ApsaraMQ for Confluent instances fully comply with Apache Kafka semantics during version upgrades and are not affected by this issue.

Client disconnections

Clients connected to a restarting broker may be temporarily disconnected. If your client library supports automatic reconnection, another broker takes over and the connection resumes without manual intervention.

Uneven traffic distribution

Message traffic may be unevenly distributed across partitions as partition leadership shifts between brokers. Evaluate whether your applications can tolerate temporary load imbalances.

Broker IP address changes

Broker IP addresses may change after the upgrade. Always connect to your Kafka cluster through domain names rather than hardcoded IP addresses to avoid connection failures.

Before you upgrade

  • Test first. If you have multiple instances, upgrade a test cluster and verify the results before you upgrade your production cluster.

  • Check your client libraries. Make sure your clients support automatic reconnection to handle broker restarts gracefully.

  • Use domain names. Verify that all clients connect through domain names, not IP addresses.

  • Plan for off-peak hours. Schedule the upgrade during low-traffic periods to minimize the impact of temporary load imbalances.

Known client issues

Go clients built with the Sarama library may experience duplicate message consumption during broker upgrades. For details, see Why is the Sarama Go client not recommended?