To replicate change data to an Apache Kafka target, define target information such as the Kafka topic or topics to which messages will be published, the message format and encoding, and the Avro schema format. You must also specify the Kafka producer properties file that includes connection information.
For Kafka targets, initial synchronization is not necessary.
On the
Target Database
tab, click
New Connection
. If you want to create a connection based on an existing connection, select a connection in the
Database Connection
list before you click
New connection
.
The
New
dialog box >
Database
view appears.
In the
Name
field, enter a name for the new Kafka connection.
Connection names can contain the digits 0-9, Latin letters A-Z and a-z, and the underscore (_) character. The Data Replication Console truncates connection names that are longer than 120 characters.
In the
Owner
list, select an owner for the target definition.
In the
Type
list, select
Apache Kafka
.
The following image shows the
New
dialog box for a Kafka target:
To the right of the
Path to Producer Properties File
field, click
Browse
to browse to the Kafka producer.properties file that Data Replication will use to communicate with the Kafka target.
You must have previously defined the file on the target Server Manager where the Applier runs for Data Replication to access the file. For more information about producer.properties files, see the Apache Kafka documentation.
In the
Select Topic
field, select one of the following methods for selecting the Kafka topics to which Data Replication writes messages that contain the source data:
Select
USE_TABLE_NAME
to direct Data Replication to use the Kafka topic names that match the mapped source table names, for each configuration that uses this connection.
By default, the auto.create.topics.enable parameter in the Kafka server.properties file is set to true. With this setting, Kafka automatically generates the topic or topics if they do not already exist when messages are sent to the topics. If you set the auto.create.topics.enable parameter to false, Kafka does not generate the topics. You must manually create the topics in Kafka before starting replication based on any configuration that uses this connection.
Enter the name of a single Kafka topic to which Data Replication will send the change data from all of the mapped source tables, for each configuration that uses this connection.
To append additional information from source tables to Kafka topic names, set either of the following advanced runtime parameters on the
Runtime Settings
tab >
Advanced Settings
view after you finish defining the Kafka target:
To include source table schema names in Kafka topic names, set the value of the apply.kafka.kafka_table_name_include_schema parameter to 1.
To specify a prefix for the Kafka topic names, enter the prefix in the apply.kafka.kafka_table_name_prefix parameter.
In the
Message Format
field, select
avro
.
In the
Message Structure
field, select the Avro format that Data Replication will use for the messages it sends to target topics. Options are:
avroFlatSchemaFormatV1
. Formats messages in a flat Avro schema format, which lists all Avro fields in one record.
avroNestedSchemaFormatV1
. Formats messages in a nested Avro schema format, which organizes each type of information in a separate record.
In the
Message Encoding
field, select the encoding method for Avro messages. Options are:
binary
json
If Informatica Intelligent Streaming will consume the data written to the Kafka messaging system, use the binary encoding type. Informatica Intelligent Streaming does not support Kafka messages that use the JSON encoding type.
If you click
Test Connection
, Data Replication always reports that the test is successful, even though it cannot validate connectivity to a Kafka target. If the connection information is not valid, Data Replication will report a connection error when it tries to connect to the Kafka target.
Click
Connect
to connect to the Kafka target.
If you connect to the target successfully, the
Map Tables
tab opens. Otherwise, Data Replication reports an error.
You can set many advanced runtime parameters for Kafka targets on the
Runtime Settings
tab >
Advanced Settings
view. If the default parameter values are not suitable for your environment, edit them. For example, you can customize the checkpoint file name and directory in the apply.kafka.kafka_checkpoint_file_name and apply.kafka.kafka_checkpoint_file_directory parameters.