Configuring CDC Publisher to Support Multiple Partitions in Individual Topics
Configuring CDC Publisher to Support Multiple Partitions in Individual Topics
You can configure PowerExchange CDC Publisher to allow the messages that contain change operations to be written to multiple partitions in any target topic on the target messaging system.
By default, CDC Publisher streams all messages that contain change operations to the same partition in any target topic. This behavior ensures that the order in which the change operations were received from the source is maintained when CDC Publisher writes the messages to the target topics on the target messaging system. If you allow CDC Publisher to write messages to multiple partitions in any target topic, the order in which changes were retrieved from the source is
not
maintained when writing messages to the target topics.
Depending on how you configure the Connector.kafkaTopic property, a target topic receives changes for all source tables or for a specific source table. In either case, the configuration requirements for using multiple partitions are the same.
To allow CDC Publisher to support multiple partitions in the targets topics, configure the following properties in the Connector configuration file,
cdcPublisherKafka.cfg
:
Connector.kafkaProducerGuaranteeDelivery=false
Controls whether the CDC Publisher uses guaranteed delivery to reduce the possibility that a message is sent to the target messaging system more than once or in the wrong order. With the default value of true, CDC Publisher overrides some CDC Publisher settings to ensure guaranteed delivery. Set this property to false to disable guaranteed delivery and be allowed to set the
Connector.sendMaintainOrder
property to false.
Connector.kafkaProducerPartitionID=-1
The numeric partition ID that the CDC Publisher instance assigns to each message that is sent to the target messaging system. CDC Publisher uses this partition ID across all messages and target topics. When sending messages to target topics with multiple partitions, use the default value of -1 to allow the target messaging system to determine the partition ID.
Connector.sendMaintainOrder=false
Controls whether CDC Publisher sends messages in the order in which the change operations were retrieved from the source or sends the messages as soon as possible without regard to order. When sending messages to target topics with multiple partitions, CDC Publisher cannot ensure that the order of change operations from the source is maintained. In this scenario, set this property to false.