Enabling the partitioning of data topics for KCOPs
You can enable partitioning of data topics for all Kafka custom operation processors
(KCOP) that are supported by the CDC Replication Engine for Kafka.
Partitioning of data topics can increase apply parallelism. This solution offers better
performance than specifying the partitioner.class property in the
kafkaproducer.properties file because it causes CDC Replication to use one Kafka
producer per partition instead of one Kafka producer per topic.
- Option 1
- By adding the property
PARTITION_AUTO, you can dynamically assign partitions to the topic you are writing to. The CDC Replication automatically determines the appropriate number of partitions and assigns them to the topic. However, the topic must exist for this property to work. Also, you must specify the path to your kafkaconsumer.properties file in kcops.properties using the KAFKACONSUMER_PROPERTIES_PATH property in order to use this feature. For example:KAFKACONSUMER_PROPERTIES_PATH=<CDC-install-dir>/instance/<your-instance>/conf/kafkaconsumer.properties PARTITION_AUTO=true - Option 2
- To specify that CDC Replication should distribute
records over a given number of partitions, add the
PARTITION_TOPIC_topic_nameproperty to a KCOP properties file. For example:PARTITION_TOPIC_data=3This setting causes CDC Replication to write records to the partitions 0, 1, and 2 for the topic data. Other topics are not partitioned.