How To
Summary
So far, the default user topic name's delimiter is ".", if we want to change it to another character in KCOP, there are two ways to archive that (one example: if we want to change from "." to "_"):
1. Use the one in current kcop (check KcopTopicMappingIntegrated.java for example), you need to know the topic name before changing it though (example: MAP_TABLE_kfk.k55.sourcedb.tabschema.a2=kfk_k55_sourcedb_tabschema_a2).
2. As an alternative, we can programmatically alter the KCOP to replace characters in the default topic name. We will use the KcopJsonFormatIntegrated.java as an example, do the following:
In createProducerRecords() method, search for the default topic name,
1) search for "jsonTopicName",
2) locate this line" String jsonTopicName = kafkaKcopOperationIn.getKafkaTopicName() + "-json";",
3) replace it with "
String jsonTopicNameOld = kafkaKcopOperationIn.getKafkaTopicName() + "_json";
String jsonTopicName = jsonTopicNameOld.replaceAll("\\.", "_");"
If user wants to use other delimiter, just replace "_" with your needed character.
Document Location
Worldwide
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
23 September 2020
UID
ibm16335151