Skip to content

Feature Gates

Starting in EMQX 6.3.0, feature gates are deployment-time controls that enable or disable optional EMQX features. They are resolved only when EMQX starts and cannot be changed at runtime.

Feature gates are configured by the EMQX_FEATURES environment variable and are designed for deployment policy. They are not stored in HOCON configuration files, are not persisted to cluster.hocon, and cannot be changed from the Dashboard, REST API, or CLI. To change the enabled feature set, update EMQX_FEATURES in the deployment environment and restart EMQX.

Configure Feature Gates

Set EMQX_FEATURES to one of the following values:

ValueDescription
Unset or emptyUses the FULL preset. This preserves the default EMQX behavior.
FULLEnables all optional features.
ESSENTIALStarts EMQX with only the core applications. All optional features are disabled.
Custom feature listEnables the listed features and their dependencies. Use lowercase feature names separated by commas, spaces, or both.

Examples:

bash
export EMQX_FEATURES=FULL
export EMQX_FEATURES=ESSENTIAL
export EMQX_FEATURES=dashboard,auth
export EMQX_FEATURES="dashboard auth"
export EMQX_FEATURES=dashboard,auth,data_integration,metrics

dashboard,auth and "dashboard auth" have the same effect. If you use spaces to separate feature names, wrap the whole value in quotes to prevent the shell from splitting it.

Do not mix a preset with feature names. For example, EMQX_FEATURES=ESSENTIAL,metrics is invalid.

WARNING

Invalid values prevent EMQX from starting. If a feature name is unknown, EMQX logs invalid_feature_specification with reason set to unknown_feature and exits with a non-zero status.

Available Features

The following optional features can be used in a custom EMQX_FEATURES list:

FeatureDescription
dashboardDashboard UI, REST API, Dashboard role-based access control, and Dashboard single sign-on.
authAuthentication and authorization chains and backends.
data_integrationRule engine, connectors, actions, sources, and data bridges.
message_transformationMessage transformation.
schema_validationSchema validation.
schema_registrySchema registry and schema definitions used by related features.
gatewaysNon-MQTT protocol gateways.
cluster_linkCluster linking.
multi_tenancyMulti-tenancy and namespace management.
aiAI features, including AI completion and Agent-to-Agent registry.
metricsPrometheus metrics export.
mqtt_extensionsMQTT extensions such as delayed publish, topic rewrite, topic metrics, auto subscription, slow subscribers, MQTT Streams, and Message Queue.
file_transferFile Transfer over MQTT.
gcp_deviceMigration compatibility shim for Google IoT Core.
exhookExternal gRPC hooks.
opentelemetryOpenTelemetry exporter.

Feature Dependencies

Some features require other features to work. When you enable a feature, EMQX automatically enables its dependencies.

FeatureAutomatically Enabled Dependencies
data_integrationschema_registry
message_transformationschema_registry
schema_validationschema_registry
aischema_registry
gatewaysauth
gcp_deviceauth
metricsdashboard, auth
opentelemetrydashboard

For example, setting EMQX_FEATURES=metrics enables metrics, dashboard, and auth.

Core Applications

The ESSENTIAL preset disables optional features, but EMQX still starts the core applications required for broker operation and management. Core applications include the MQTT broker, configuration system, CLI, license validation, plugin framework, durable storage, audit log, node rebalance, retainer, TLS PSK, outbound telemetry, and shared resource or bridge framework applications.

Existing feature-specific configuration sections can remain in configuration files when the corresponding feature gate is disabled. EMQX does not start the applications behind disabled features, so those configuration sections are not used until the feature is enabled again.

Inspect Enabled Features

In the Dashboard, click Monitoring -> Cluster Overview -> Nodes and check the Feature Preset column. The column shows whether each node started with the full, essential, or custom preset. custom means that EMQX_FEATURES contains an explicit feature list. Stopped nodes and nodes running versions earlier than 6.3 do not report a preset.

The Dashboard shows only the preset. To inspect the exact enabled and disabled feature lists, use the startup log or REST API.

EMQX logs the resolved feature state during startup:

text
feature_gates_resolved

The log entry includes the resolved preset, enabled feature list, and disabled feature list.

When the dashboard feature is enabled, you can also query the resolved state through the REST API:

bash
curl -u <API_KEY>:<SECRET_KEY> http://localhost:18083/api/v5/features

Example response:

json
{
  "preset": "custom",
  "enabled": ["auth", "dashboard", "metrics"],
  "disabled": ["ai", "cluster_link", "data_integration"]
}

The exact lists depend on the EMQX edition, version, and configured feature set.

TIP

GET /api/v5/features is served by the Dashboard and management API applications. If the dashboard feature is disabled, inspect the resolved feature set from the startup log instead.

Cluster Deployment Considerations

For operational consistency, configure the same EMQX_FEATURES value on all nodes in a cluster. A mixed-feature cluster can expose different REST APIs, background applications, and cross-node behavior on different nodes.

When you use Docker Compose, Kubernetes, or another orchestration system, set EMQX_FEATURES in the shared deployment manifest so added and restarted nodes receive the same value.