Example: Data Replication
Step-by-step example of configuring and running both the GridGain Source and Sink Kafka connectors to replicate data between two GridGain clusters.
This example demonstrates how to configure and run both the Source and Sink connectors.

Prerequisites
GridGain Enterprise or Ultimate version 8.8.31 or later is installed. The
IGNITE_HOMEenvironment variable points to GridGain installation directory on every GridGain node.Kafka 3.5.0 is installed. The
KAFKA_HOMEenvironment variable points to Kafka installation directory on every node.Optional: Control Center 2023.2 is available as an on-premise or cloud-based service.
Step 1: Install GridGain Kafka Connector
1.1. Prepare GridGain Connector Package
Download the gridgain/gridgain-kafka-connect component that matches your GridGain version from Confluent Hub, unzip it, and rename the extracted directory to gridgain-kafka-connect. If you run GridGain Ultimate Edition, copy $IGNITE_HOME/libs/gridgain-ultimate/*.jar into the gridgain-kafka-connect/lib directory.
1.2. Register GridGain Connector with Kafka
In this example, we assume /opt/kafka/connect is the Kafka connector installation directory.
For every Kafka Connect Worker:
Copy the
gridgain-kafka-connectdirectory you prepared in the previous step to/opt/kafka/connecton the Kafka Connect worker.Edit the Kafka Connect Worker configuration (
$KAFKA_HOME/config/connect-standalone.propertiesfor single-worker Kafka Connect cluster or$KAFKA_HOME/config/connect-distributed.propertiesfor multiple node Kafka Connect cluster) to register the connector in the plugin path:
Step 2: Start Ignite Clusters and Load Data
Our goal is to bootstrap environment with the following parts:
GridGain source cluster
GridGain sink cluster
GridGain Control Center (optional)
2.1. Prepare Source and Sink Clusters
Create the source and sink Ignite cluster configurations. The following configuration files allow running both clusters on the same host. Note that the sink cluster uses different port values for discovery and thin/ODBC/JDBC connections.
Start the source Ignite cluster (assuming the Ignite configuration file is in the current directory):
Start the Sink Ignite cluster:
2.2. Attach Both Clusters to Control Center
Refer to following article for the cluster attachment procedure.
You should end up having both clusters in the Control Center cluster list:

2.3. Load Data into Source Cluster
Load some data into the source Ignite cluster using SQL:

Now you can ensure that no data were replicated either by querying the city table via sqlline.sh or by looking into the SQL view for the Sink cluster.

Step 3: Start Kafka and GridGain Source and Sink Connectors
Start the Kafka cluster:
Create the GridGain Source and Sink Connector configuration files (replace IGNITE_CONFIG_PATH with the absolute path to the Ignite configuration created above):
Start connectors (assuming the connector configuration files are in the current directory):
Step 4: Observe Initial Data Replication
Verify that both city entries were successfully replicated to the Sink cluster.

Step 5: Observe Runtime Data Replication
Add more cities to the Source cluster:

Check the city table in the Sink cluster again to see that new Chicago data has been replicated .

Step 6: Observe Dynamic Cache Replication
Create a new person table in the Source cluster and load some data into it:

Now check caches list in Sink cluster

If you take a look to list of SQL tables available in Sink cluster, you won't find person table.
You were able to read data in the Sink cluster via SQL because you had explicitly declared the SQL schema (QueryEntity) in the configuration files for both clusters.
To make sure that the persons entries were successfully replicated, use the Caches view in Control Center:

As you can see, the Sink cluster contains the same amount of keys that were inserted in the Source cluster.
You can also read these entries as BinaryObjects via ScanQuery run from the thin client:
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

