Overview
Chargeback with Gateway (previously known as Chargeback) allows organizations to track and allocate costs/usage associated with Kafka resources to different teams or departments based on the data they consume and process to facilitate cost accountability and management.Prerequisites
Chargeback with Gateway requires both Console (v1.29.0 and above) and Gateway (v3.4.0 and above). If you’re using Console v1.41.0 or above, you’ll need to enable the Chargeback feature flag to use this functionality:| Environment variable | Type | Default | Description |
|---|---|---|---|
CDK_CHARGEBACKV2_ENABLED | Boolean | false | Set to true to enable Chargeback with and without Gateway |
Enable Chargeback with Gateway in Console
-
Enable the feature flag before starting Console:
- bash
- docker compose
- Go to Settings > Clusters and select your cluster.
-
In the Provider tab, select Gateway and enter the API details with the default Virtual Cluster value of passthrough.

- Deploy the Chargeback with Gateway Interceptor on Gateway:
- curl
- Conduktor CLI
Chargeback with Gateway Interceptor
This Interceptor monitors produce and consume requests to store metrics about incoming and outgoing traffic (bytes) in a topic. Console uses this topic to display Chargeback with Gateway.Configure Chargeback with Gateway Interceptor
| Name | Type | Default | Description |
|---|---|---|---|
| topicName | String | Topics used to store observability metrics. If this topic already exists in your cluster, it has to have only one partition. If the topic doesn’t exist, Gateway will create it when you deploy the plugin. | |
| replicationFactor | Int | The replication factor to set if Gateway needs to create the topic. | |
| flushIntervalInSecond | Int | 300 | The periodic interval for flushing metrics to the specified topic. |