Connect with Confluent Cloud Apache Kafka® cluster
Confluent Cloud Apache Kafka is a fully managed distributed data streaming platform, deployable in a cloud, maintained by Confluent. This section provides you with information on how to connect Confluent Cloud Apache Kafka cluster with Klaw. The following functionalities are available in Klaw for Confluent Cloud:
- Create topics
- Delete topics
- Create ACLs
- Delete ACLs
- Sync topics
- Sync ACLs
References:
Prerequisite
- Set up the connection between the Klaw APIs (Klaw Core API and Klaw Cluster
API), see
klaw-core-with-clusterapi
. This involves configuring theklaw.clusterapi.url
setting in the Klaw UI and testing the connectivity to ensure the two APIs can communicate. - Both the Klaw APIs are running on SSL/HTTPS.
Configure and connect using SSL/APIKeys
Follow the steps below to configure and connect to a Confluent Cloud Apache Kafka and Klaw using SSL protocol:
-
In the Klaw web interface, navigate to Environments, and click Clusters.
-
On the Clusters page, click Add Cluster.
-
On the Add Kafka cluster page, enter the following details:
- Cluster Type: Select Kafka from the drop-down list
- Cluster Name: Provide a name for the cluster
- Protocol: Select SSL protocol for your cluster
- Kafka Flavor: Select Confluent Cloud Apache Kafka as the flavor
- Bootstrap server: Enter the REST endpoint of your Confluent Cloud Apache Kafka cluster (without
https://
). Ex:xyz-pk07es.us-west4.gcp.confluent.cloud:443
-
Click Save.
-
Add the cluster to the preferred environment. Click Environments from the Environments drop-down menu.
-
Click Add Environment and enter the details to add your Apache Kafka environment.
-
Enter an environment name, select the added cluster from the drop-down list, and configure partitions, replication factor, and tenant (set to default).
-
Copy the Cluster ID from the Clusters page using the copy icon that is available on the right-hand side of each cluster row.
-
Open the
application.properties
file located in theklaw/cluster-api/src/main/resources
directory. -
Configure the API key, API secret, URIs to connect to Confluent Cloud Apache Kafka clusters by copying and editing the following lines:
#clusterid.klaw.confluentcloud.credentials=apikey:apisecret
#clusterid.klaw.clusters.counfluentcloud.acls.api=/kafka/v3/clusters/{cluster_id}/acls
#clusterid.klaw.clusters.counfluentcloud.topics.api=/kafka/v3/clusters/{cluster_id}/topics
#Example :
dev3.klaw.clusters.counfluentcloud.acls.api=/kafka/v3/clusters/abc-ab1abc/acls- Copy the
{cluster_id}
from the Confluent Cloud portal (Cluster Settings > General > Identification > Cluster ID) and insert into the API URI. - Copy the API key/secrets from Confluent Cloud > API Keys.
- For the lines starting with
clusterid
, replaceclusterid
with the Klaw Cluster ID. Save theapplication.properties
file.
- Copy the
-
Re-deploy the Klaw Cluster API with the updated configuration. This will apply the changes and enable Klaw to connect to Confluent Cloud Apache Kafka cluster using APIKey/Secret.