Skip to content

DRAFT: Change Data Capture documentation#11464

Open
stefanus-heath wants to merge 3 commits into
mendix:developmentfrom
stefanus-heath:cdc-documentation
Open

DRAFT: Change Data Capture documentation#11464
stefanus-heath wants to merge 3 commits into
mendix:developmentfrom
stefanus-heath:cdc-documentation

Conversation

@stefanus-heath

Copy link
Copy Markdown
Contributor

No description provided.

@stefanus-heath stefanus-heath requested a review from quinntracy July 2, 2026 08:34
@CLAassistant

CLAassistant commented Jul 2, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@quinntracy quinntracy self-assigned this Jul 2, 2026
@quinntracy

Copy link
Copy Markdown
Collaborator

@stefanus-heath Just to confirm, can I take a look at this first draft or are you still adding content?


### Service Name {#service-name}

The service name uniquely identifies the CDC service within the app. It is used as part of the Kafka topic name.

@EmaGom EmaGom Jul 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used as part of the Kafka topic name.

We should remove this, the topic does not include the service name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service name must be unique within the app, however, it is not user as part of the topic name.
Please add that we use App name to make the topic name unique, and that a topic name must be unique within the app.


## How It Works

A CDC service document in Studio Pro defines which entities the runtime should track. On deployment, each tracked entity gets its own Kafka topic. Every time a committed object change occurs — create, update, or delete — the runtime publishes an event to the corresponding topic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention about snapshot too to complete the CRUD. In this case snapshot would be [R]ead.

It would be a good idea to mention Leader Selection and its configuration.


A CDC service document in Studio Pro defines which entities the runtime should track. On deployment, each tracked entity gets its own Kafka topic. Every time a committed object change occurs — create, update, or delete — the runtime publishes an event to the corresponding topic.

The Kafka broker is either the [Mendix Event Broker](/appstore/services/event-broker/) or a Bring Your Own Kafka (BYOK) cluster. For details on configuring BYOK, see the [Mendix Event Broker](/appstore/services/event-broker/) page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case they want to BYOK, then they need a schema to parse the message. This is available in the Async API.
Mention that our Kafka message is Debezium compatible. This would help BYOK to easily integrate with consumer that accept Debezium format without any transformation in between.

| --- | --- | --- |
| `Kafka.BootstrapServers` | The address of the Kafka broker, in the format `host:port`. | |
| `Kafka.Username` | The username for SASL/SCRAM-SHA-512 authentication with the Kafka cluster. | |
| `Kafka.Password` | The password for SASL/SCRAM-SHA-512 authentication with the Kafka cluster. | |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the complete list of our Runtime configuration, added for CDC document:

{
    "Kafka.BootstrapServers",
    "Kafka.Username",
    "Kafka.Password",
    "EventBroker.Space",
    
    // Snapshot
    "Datastorage.StartSnapshotMinInterval", 
    "EventBroker.CdcForceSnapshotEntities", // only available in 11.12.1

    // Leader election for multi instances
    "EventBroker.CdcActiveProducerElectionTopic"
    "EventBroker.CdcActiveProducerElectionGroupId"

    // Kafka transaction, helps also in denying non-leader
    "EventBroker.CdcProducerTransactionId"
}

The EventBroker.Space default value is "local", so it is recommended to give a good name on the cloud because this is part of the Kafka topic name. Or is this part of the EventBroker documentation?

The leader election is optional but available for multi instances. I think it worth to mention it incase the user want to configure it.


### Service Name {#service-name}

The service name uniquely identifies the CDC service within the app. It is used as part of the Kafka topic name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service name must be unique within the app, however, it is not user as part of the topic name.
Please add that we use App name to make the topic name unique, and that a topic name must be unique within the app.

| **Exposed name** | The name used for this entity in the Kafka topic and event payload. Defaults to the entity name. |
| **Modification** | The pending change state: **Added**, **Changed**, or **Removed**. Blank if the entity is unchanged since the last accepted revision. |
| **Revision** | The schema version of the entity's event payload. See [Revisions](#revisions). |
| **Topic** | The Kafka topic name for this entity, in the format `cdc.<app-name>.<ExposedName>.<revision>.{space}`, where `{space}` is replaced at runtime by the Event Broker space name. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where {space} is replaced at runtime by the Event Broker space name.

You can link to the actual runtime configuration here.


Expand an entity row to see each attribute and association with a checkbox. Uncheck an item to exclude it from the event payload. The **Exposed name** column lets you rename individual attributes in the payload independently of their domain model names.

Associations appear as nested data within the parent entity's event payload. They do not produce separate Kafka topics and show no **Revision** or **Topic** values of their own.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Associations appear as list of identifiers actually, not as nested data.
  2. "They" here can be confusing, it might refer to only associations, since we just explained about Associations. Rephrase it so "they" applies to all entity properties (attributes and associations).


## Revisions {#revisions}

Each tracked entity has a **Revision** number that identifies the schema version of its event payload. Downstream consumers use the revision to detect and respond to schema changes. The revision is also embedded in the Kafka topic name, so each schema version has its own isolated topic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so each schema version has its own isolated topic.

we only use the major version of the schema version in topic name. If the change is minor, then you don't get a new topic name.

Studio Pro manages revisions automatically. When you modify the tracked configuration of an entity, Studio Pro marks it as **Changed** and calculates the new revision based on whether the change is breaking or non-breaking:

* **Minor revision** (for example, `1.0` → `1.1`) — a non-breaking change such as adding a new attribute. Existing consumers can continue reading the topic without modification.
* **Major revision** (for example, `1.0` → `2.0`) — a breaking change such as removing an attribute, renaming an entity's exposed name, or removing an entity from tracking. Consumers must be updated to use the new topic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I assume we are talking about revision for entity. We do have revision for document but that is hidden.

The explanation here seems to be leading toward the revision for document, especially the following description "renaming an entity's exposed name, or removing an entity from tracking."

I am going to check in Studio Pro if this is true. It is possible that when you rename exposed name then you would get v1 again since the topic name is unique enough e.g. cdc.appname.newExposedName.1.{space} -> this would be a new topic in Kafka.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the Studio Pro and we do increase major version if the exposed name get renamed. I think we can leave this description as-is.

Accepting changes confirms the new revision numbers and clears the modification states, leaving the document in a clean state ready for deployment.

{{% alert color="warning" %}}
A major revision creates a new Kafka topic. Consumers subscribed to the previous topic version will no longer receive events after deployment. Ensure downstream systems are updated before deploying a major revision change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure downstream systems are updated before deploying a major revision change.

How is this possible? I think the ordering is for provider side to deploy first, then the consumer side can get the updated topic name. The consumer are free to consume the old topic name but it won't be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants