Prerequisites
You must have a GCP project in order to use Cloud Pub/Sub or Pub/Sub Lite. Follow these setup steps for Pub/Sub before doing the quickstart. Follow these setup steps for Pub/Sub Lite before doing the quickstart. For general information on how to authenticate with GCP when using the Google Cloud Pub/Sub Group Kafka Connector library, please visit Provide credentials for Application Default Credentials.Quick Start
- Setup the kcctl client: doc
- Create a Pub/Sub topic in your GCP project.
- Create a JSON file like the following:
- Run the following command to create the connector:
Configuration
The Google Pub/Sub Lite sink connector is configured using the following properties:| Config | Value Range | Default | Description |
|---|---|---|---|
| pubsublite.topic | String | REQUIRED (No default) | The Pub/Sub Lite topic ID, e.g. “foo” for topic “/projects/bar/locations/europe-south7-q/topics/foo”. |
| pubsublite.project | String | REQUIRED (No default) | The project containing the Pub/Sub Lite topic, e.g. “bar” from above. |
| pubsublite.location | String | REQUIRED (No default) | The location of the Pub/Sub Lite topic, e.g. “europe-south7-q” from above. |
| gcp.credentials.file.path | String | Optional | The filepath, which stores GCP credentials. If not defined, the environment variable GOOGLE_APPLICATION_CREDENTIALS is used. If specified, use the explicitly handed credentials. Consider using the externalized secrets feature in Kafka Connect for passing the value. |
| gcp.credentials.json | String | Optional | GCP credentials JSON blob. If specified, use the explicitly handed credentials. Consider using the externalized secrets feature in Kafka Connect for passing the value. |

































