Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CDC is intended for developers who need to move Mendix domain model data to exte

A CDC service document in Studio Pro defines which entities the Mendix Runtime should track. On deployment, each tracked entity gets its own Kafka topic. When an object creation, update, or deletion is committed, the Runtime publishes a CDC event to that entity's topic.

At startup, CDC checks whether a tracked entity has a [new topic](/refguide/published-cdc-services/#topic). If it does, the entity needs a snapshot. A snapshot populates the topic with the entity's current data as read events. For more information, see the [Snapshot Settings](#snapshot-settings) below and the [Revisions](/refguide/published-cdc-services/#revisions) section of *Published CDC Services*.
At startup, CDC checks whether a tracked entity has a [new topic](/refguide/published-cdc-services/#topic). If it does, the entity needs a snapshot. A topic is new, for example, after a breaking change or when you set a [topic prefix](#topic-prefix). A snapshot populates the topic with the entity's current data as read events. For more information, see the [Snapshot Settings](#snapshot-settings) below and the [Revisions](/refguide/published-cdc-services/#revisions) section of *Published CDC Services*.

To publish a CDC event, the Runtime creates a [Kafka record](/refguide/kafka-concepts/#record-event-and-message) and submits it to the producer, the Kafka client responsible for sending records to Kafka. The record specifies the [topic for the tracked entity](/refguide/published-cdc-services/#topic) and carries the object ID as the key and the event as the JSON value.

Expand Down Expand Up @@ -107,6 +107,18 @@ For more examples by SASL mechanism, see [JAAS configuration for Kafka clients](

For an unauthenticated plaintext connection, leave the credentials empty and remove any custom authentication settings for that connection.

### Topic Prefix {#topic-prefix}

By default, the Kafka topic names of a CDC service start with `cdc.<app-name>`. For example, the topic of the `Order` entity can be `cdc.MyApp.Order.1.production`.

You can replace this prefix with the following runtime setting. Use it only with your own Kafka cluster (BYOK), and do not set it for Mendix Event Broker. Add it through [custom runtime settings](/refguide/custom-settings/) in your environment.

| Name | Description | Default Value |
| --- | --- | --- |
| `EventBroker.CdcTopicPrefixOverride` | The prefix that replaces `cdc.<app-name>` in the topic names of all tracked entities (introduced in Mendix 11.18.0). For example, with the value `mycompany.myservice`, the topic `cdc.MyApp.Order.1.production` becomes `mycompany.myservice.Order.1.production`. | Not set |

The prefix and the complete topic name can contain only letters, digits, dots, underscores, and hyphens. The complete topic name, including the exposed name, the revision, and the Event Broker space, can have at most 249 characters. When a topic name is not valid, the Runtime does not start.

### Active-Producer Election {#active-producer-election}

{{% alert type="info" %}}
Expand Down Expand Up @@ -191,7 +203,7 @@ The `source` block contains the following fields:

Because the format is Debezium-compatible, BYOK consumers that already support Debezium (such as Kafka Connect sink connectors for databases or data warehouses) can consume CDC events without any message transformation.

To parse CDC events, use the schema for the tracked entity in its AsyncAPI document, which describes each topic as an [AsyncAPI channel](/refguide/kafka-concepts/#asyncapi-channel). You can download the AsyncAPI document from the CDC service details page in the [Event Broker Manager](https://broker.mendix.com/).
To parse CDC events, use the schema for the tracked entity in its AsyncAPI document, which describes each topic as an [AsyncAPI channel](/refguide/kafka-concepts/#asyncapi-channel). You can download the AsyncAPI document from the CDC service details page in the [Event Broker Manager](https://broker.mendix.com/). The document shows the default topic names, even when you set a [topic prefix](#topic-prefix).

For details on setting up a BYOK cluster with the Mendix Event Broker, see [Mendix Event Broker](/appstore/services/event-broker/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ The **Topic** column is the Kafka topic name for this entity, in the format `cdc

The topic name changes when an entity gets a new major [revision](#revisions), because the major revision is part of the name. The topic name also changes when you change the [`EventBroker.Space`](/refguide/change-data-capture/#kafka-connection-settings) setting, because the space is part of the name. When the topic name of an entity changes, CDC creates a snapshot of that entity at startup. For the conditions, see the [Snapshot Settings](/refguide/change-data-capture/#snapshot-settings) section in *Change Data Capture*.

To replace the `cdc.<app-name>` part of the topic name at runtime, see [Topic Prefix](/refguide/change-data-capture/#topic-prefix). The **Topic** column keeps showing the default name.

## Attribute and Association Selection {#attributes}

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 allows you to rename individual attributes in the payload independently of their domain model names.
Expand Down