Este contenido no está disponible en el idioma seleccionado.

Chapter 7. Enabling AMQ Streams feature gates


AMQ Streams operators use feature gates to enable or disable specific features and functions. By enabling a feature gate, you alter the behavior of the corresponding operator, thereby introducing the feature to your AMQ Streams deployment.

A feature gate might be enabled or disabled by default, depending on its level of maturity.

To modify a feature gate’s default state, use the STRIMZI_FEATURE_GATES environment variable in the operator’s configuration. You can modify multiple feature gates using this single environment variable. Specify a comma-separated list of feature gate names and prefixes. A + prefix enables the feature gate and a - prefix disables it.

Example feature gate configuration that enables FeatureGate1 and disables FeatureGate2

env:
  - name: STRIMZI_FEATURE_GATES
    value: +FeatureGate1,-FeatureGate2
Copy to Clipboard Toggle word wrap

7.1. ControlPlaneListener feature gate

The ControlPlaneListener feature gate has moved to GA, which means it is now permanently enabled and cannot be disabled. With ControlPlaneListener enabled, the connections between the Kafka controller and brokers use an internal control plane listener on port 9090. Replication of data between brokers, as well as internal connections from AMQ Streams operators, Cruise Control, or the Kafka Exporter use the replication listener on port 9091.

Important

With the ControlPlaneListener feature gate permanently enabled, it is no longer possible to upgrade or downgrade directly between AMQ Streams 1.7 and earlier and AMQ Streams 2.3 and newer. You have to first upgrade or downgrade through one of the AMQ Streams versions in-between, disable the ControlPlaneListener feature gate, and then downgrade or upgrade (with the feature gate enabled) to the target version.

7.2. ServiceAccountPatching feature gate

The ServiceAccountPatching feature gate has moved to GA, which means it is now permanently enabled and cannot be disabled. With ServiceAccountPatching enabled, the Cluster Operator always reconciles service accounts and updates them when needed. For example, when you change service account labels or annotations using the template property of a custom resource, the operator automatically updates them on the existing service account resources.

7.3. UseStrimziPodSets feature gate

The UseStrimziPodSets feature gate has moved to GA, which means it is now permanently enabled and cannot be disabled. Support for StatefulSets has been removed and AMQ Streams is now always using StrimziPodSets to manage Kafka and ZooKeeper pods.

Important

With the UseStrimziPodSets feature gate permanently enabled, it is no longer possible to downgrade directly from AMQ Streams 2.5 and newer to AMQ Streams 2.0 or earlier. You have to first downgrade through one of the AMQ Streams versions in-between, disable the UseStrimziPodSets feature gate, and then downgrade to AMQ Streams 2.0 or earlier.

7.4. (Preview) UseKRaft feature gate

The UseKRaft feature gate has a default state of disabled.

The UseKRaft feature gate deploys the Kafka cluster in the KRaft (Kafka Raft metadata) mode without ZooKeeper. ZooKeeper and KRaft are mechanisms used to manage metadata and coordinate operations in Kafka clusters. KRaft mode eliminates the need for an external coordination service like ZooKeeper. In KRaft mode, Kafka nodes take on the roles of brokers, controllers, or both. They collectively manage the metadata, which is replicated across partitions. Controllers are responsible for coordinating operations and maintaining the cluster’s state.

This feature gate is currently intended only for development and testing.

Important

KRaft mode is not ready for production in Apache Kafka or in AMQ Streams.

Enabling the UseKRaft feature gate requires the KafkaNodePools feature gate to be enabled as well. To deploy a Kafka cluster in KRaft mode, you must use the KafkaNodePool resources. For more details and examples, see Section 6.3.2, “(Preview) Deploying Kafka node pools”. The Kafka custom resource using KRaft mode must also have the annotation strimzi.io/kraft: enabled.

When the UseKRaft feature gate is enabled and such annotation is set, the Kafka cluster is deployed without ZooKeeper. The .spec.zookeeper properties in the Kafka custom resource are ignored, but still need to be present. The UseKRaft feature gate provides an API that configures Kafka cluster nodes and their roles. The API is still in development and is expected to change before the KRaft mode is production-ready.

Currently, the KRaft mode in AMQ Streams has the following major limitations:

  • Moving from Kafka clusters with ZooKeeper to KRaft clusters or the other way around is not supported.
  • Controller-only nodes cannot undergo rolling updates or be updated individually.
  • Upgrades and downgrades of Apache Kafka versions or the AMQ Streams operator are not supported. Users might need to delete the cluster, upgrade the operator and deploy a new Kafka cluster.
  • Only the Unidirectional Topic Operator is supported in KRaft mode. You can enable it using the UnidirectionalTopicOperator feature gate. The Bidirectional Topic Operator is not supported and when the UnidirectionalTopicOperator feature gate is not enabled, the spec.entityOperator.topicOperator property must be removed from the Kafka custom resource.
  • JBOD storage is not supported. The type: jbod storage can be used, but the JBOD array can contain only one disk.

Enabling the UseKRaft feature gate

To enable the UseKRaft feature gate, specify +UseKRaft,+KafkaNodePools in the STRIMZI_FEATURE_GATES environment variable in the Cluster Operator configuration. The Kafka custom resource using KRaft mode must also have the annotation strimzi.io/kraft: enabled. If such annotation is set to disabled, missing or any other value, the operator will handle the Kafka custom resource as using ZooKeeper mode.

7.5. StableConnectIdentities feature gate

The StableConnectIdentities feature gate has a default state of enabled.

The StableConnectIdentities feature gate uses StrimziPodSet resources to manage Kafka Connect and Kafka MirrorMaker 2 pods instead of using OpenShift Deployment resources. StrimziPodSets give the pods stable names and stable addresses, which do not change during rolling upgrades. This helps to minimize the number of rebalances of connector tasks.

Disabling the StableConnectIdentities feature gate

To disable the StableConnectIdentities feature gate, specify -StableConnectIdentities in the STRIMZI_FEATURE_GATES environment variable in the Cluster Operator configuration.

Important

The StableConnectIdentities feature gate must be disabled when downgrading to AMQ Streams 2.3 and earlier versions.

7.6. (Preview) KafkaNodePools feature gate

The KafkaNodePools feature gate has a default state of disabled.

The KafkaNodePools feature gate introduces a new KafkaNodePool custom resource that enables the configuration of different pools of Apache Kafka nodes.

A node pool refers to a distinct group of Kafka nodes within a Kafka cluster. Each pool has its own unique configuration, which includes mandatory settings such as the number of replicas, storage configuration, and a list of assigned roles. You can assign the controller role, broker role, or both roles to all nodes in the pool in the .spec.roles field. When used with a ZooKeeper-based Apache Kafka cluster, it must be set to the broker role. When used with the UseKRaft feature gate, it can be set to broker, controller, or both.

In addition, a node pool can have its own configuration of resource requests and limits, Java JVM options, and resource templates. Configuration options not set in the KafkaNodePool resource are inherited from the Kafka custom resource.

The KafkaNodePool resources use a strimzi.io/cluster label to indicate to which Kafka cluster they belong. The label must be set to the name of the Kafka custom resource.

Examples of the KafkaNodePool resources can be found in the example configuration files provided by AMQ Streams.

Enabling the KafkaNodePools feature gate

To enable the KafkaNodePools feature gate, specify +KafkaNodePools in the STRIMZI_FEATURE_GATES environment variable in the Cluster Operator configuration. The Kafka custom resource using the node pools must also have the annotation strimzi.io/node-pools: enabled.

7.7. (Preview) UnidirectionalTopicOperator feature gate

The UnidirectionalTopicOperator feature gate has a default state of disabled.

The UnidirectionalTopicOperator feature gate introduces a unidirectional topic management mode for creating Kafka topics using the KafkaTopic resource. Unidirectional mode is compatible with using KRaft for cluster management. With unidirectional mode, you create Kafka topics using the KafkaTopic resource, which are then managed by the Topic Operator. Any configuration changes to a topic outside the KafkaTopic resource are reverted. For more information on topic management, see Section 9.1, “Topic management modes”.

Enabling the UnidirectionalTopicOperator feature gate

To enable the UnidirectionalTopicOperator feature gate, specify +UnidirectionalTopicOperator in the STRIMZI_FEATURE_GATES environment variable in the Cluster Operator configuration. For the KafkaTopic custom resource to use this feature, the strimzi.io/managed annotation is set to true by default.

7.8. Feature gate releases

Feature gates have three stages of maturity:

  • Alpha — typically disabled by default
  • Beta — typically enabled by default
  • General Availability (GA) — typically always enabled

Alpha stage features might be experimental or unstable, subject to change, or not sufficiently tested for production use. Beta stage features are well tested and their functionality is not likely to change. GA stage features are stable and should not change in the future. Alpha and beta stage features are removed if they do not prove to be useful.

  • The ControlPlaneListener feature gate moved to GA stage in AMQ Streams 2.3. It is now permanently enabled and cannot be disabled.
  • The ServiceAccountPatching feature gate moved to GA stage in AMQ Streams 2.3. It is now permanently enabled and cannot be disabled.
  • The UseStrimziPodSets feature gate moved to GA stage in AMQ Streams 2.5 and the support for StatefulSets is completely removed. It is now permanently enabled and cannot be disabled.
  • The StableConnectIdentities feature gate is in beta stage and is enabled by default.
  • The UseKRaft feature gate is available for development only and does not currently have a planned release for moving to the beta phase.
  • The KafkaNodePools feature gate is in alpha stage and is disabled by default.
  • The UnidirectionalTopicOperator feature gate is in alpha stage and is disabled by default.
Note

Feature gates might be removed when they reach GA. This means that the feature was incorporated into the AMQ Streams core features and can no longer be disabled.

Expand
Table 7.1. Feature gates and the AMQ Streams versions when they moved to alpha, beta, or GA
Feature gateAlphaBetaGA

ControlPlaneListener

1.8

2.0

2.3

ServiceAccountPatching

1.8

2.0

2.3

UseStrimziPodSets

2.1

2.3

2.5

UseKRaft

2.2

-

-

StableConnectIdentities

2.4

2.6

-

KafkaNodePools

2.5

-

-

UnidirectionalTopicOperator

2.5

-

-

If a feature gate is enabled, you may need to disable it before upgrading or downgrading from a specific AMQ Streams version (or first upgrade / downgrade to a version of AMQ Streams where it can be disabled). The following table shows which feature gates you need to disable when upgrading or downgrading AMQ Streams versions.

Expand
Table 7.2. Feature gates to disable when upgrading or downgrading AMQ Streams
Disable Feature gateUpgrading from AMQ Streams versionDowngrading to AMQ Streams version

ControlPlaneListener

1.7 and earlier

1.7 and earlier

UseStrimziPodSets

-

2.0 and earlier

StableConnectIdentities

-

2.3 and earlier

Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat