9.2.24 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.

9.2.24.1 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.

9.2.24.2 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.
  2. In GCS, go to Cloud DNS,
  3. Click on the zone name created for Managed Kafka. It displays all the broken IP addresses that needs to be resolved by OCI.
  4. In OCI, go to Networking, DNS Management , then private views.
  5. Click on the private views created for the VCN used in OCI - GCP fastconnect.
  6. Go to private zones and click Create zone.
  7. For Zone name, provide managedkafka.<gcs-project-ids>.cloud.goog.
  8. Click on the Zone name.
  9. 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.

  10. Use base64 -w 0 < my_service_account_key.json > password.txt to generate a password from service account key file.
  11. 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 write should be success.

  12. Configure Oracle GoldenGate Kafka replicat and run the replicat.

9.2.24.3 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"

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 < my_service_account_key.json > password.txt to generate a password from service account key file..