Google Cloud Managed Service for Apache Kafka
The Google Cloud Managed Service for Apache Kafka is a fully managed, Apache Kafka-compatible service on Google Cloud .
This chapter describes how to use the Google Cloud Managed Service for Apache Kafka.
Overview
Oracle GoldenGate for Distributed Applications and Analytics (GG for DAA) can be used to publish change data capture operation messages to Google Cloud Managed Service for Apache Kafka.
GG for DAA connecting to Google Cloud Managed Service for Apache Kafka needs to run on GCP within the same subnet or, it can connect to Google Cloud Managed Service for Apache Kafka through ipSec VPN/ fastconnect.
Note:
- Google Cloud Managed Service for Apache Kafka does not support public client access.
- GG for DAA Kafka Handler, see Kafka Handler or the Kafka Connect Handler, see Kafka Connect Handler Schema registry, with Google Cloud Managed Service for Apache Kafka is not supported.
Configuration from Oracle Cloud Infrastructure (OCI)
To configure the Google Cloud Managed Service for Apache Kafka from Oracle Cloud Infrastructure (OCI): 1. Create Manged Kafka in Google Cloud with the subnet used in interconnect.
-
In GCS, go to Cloud DNS,
-
Click on the zone name created for Managed Kafka. It displays all the broken IP addresses that needs to be resolved by OCI.
-
In OCI, go to Networking, DNS Management, then private views.
-
Click on the private views created for the VCN used in OCI - GCP fastconnect.
-
Go to private zones and click Create zone.
-
For Zone name, provide
managedkafka.<gcs-project-ids>.cloud.goog. -
Click on the Zone name.
-
Go to Records and click Manage records, Add record. Add a record for each IP of your Managed Kafka brokers that you located in previous steps.
For Name, provide the complete DNS Name and for RData, provide the IP. For example:
DNS Name: bootstrap.mykafka.europe-west2.managedkafka.my-project.cloud.goog / Record Data: 172.20.0.3. -
Use
base64 -w 0 < my_service_account_key.json > password.txtto generate a password from service account key file. -
Verify, if the target topic is accessible from the subnet in OCI.
In OCI VM, test with a
kafka client: ./kafka-console-producer.sh --bootstrap-server bootstrap.mykafka.europe-west2.managedkafka.my-project.cloud.goog:9092 --topic testtopic --producer.config /home/opc/kfk.propertiesMessage writeshould be success. -
Configure Oracle GoldenGate Kafka replicat and run the replicat.
Sample Configuration
The following is a sample configuration for the Google Cloud Managed Service for Apache Kafka :
bootstrap.servers=bootstrap.mykafka.europe-west2.managedkafka.my-project.cloud.goog:9092
value.serializer=org.apache.kafka.common.serialization.ByteArraySerializer
key.serializer=org.apache.kafka.common.serialization.ByteArraySerializer
security.protocol=SASL_SSL
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="myuser" password="mypassword"
<div class="infoboxnote" markdown="1">
**Note:**
- Username is your `GCP SERVICE_ACCOUNT_EMAIL_ADDRESS`.
- Password is `CONTENTS_OF_BASE64_ENCODED_PASSWORD_FILE` from the previous steps where you have used the `base64 -w 0 password.txt` to generate a password from service account key file..
</div>
Related Topics