Google Cloud Pub/Sub
Overview
Google Cloud Pub/Sub pulls messages from a GCP Pub/Sub subscription. Supports GCP Cloud Logging, raw text, and OTLP protocols.
Supported platforms
- Linux:
Logs - Windows:
Logs - macOS:
Logs
Authentication Configuration
Google Cloud Pub/Sub supports optional authentication via GCP ADC.
| Parameter | Type | Description |
|---|---|---|
| Credential Type | option | env for GCP ADC (recommended): Set GOOGLE_APPLICATION_CREDENTIALS env var to service account JSON path. |
Basic Configuration
| Parameter | Type | Default Value | Required | Description |
|---|---|---|---|---|
| subscription | string | none | Yes | Fully qualified resource name of the Pub/Sub subscription in format projects/project-id/subscriptions/your-sub-name. |
| encoding | string | googlecloudlogentry | Yes | Log Format (Encoding): The format of the messages arriving in the Pub/Sub topic (Enum: googlecloudlogentry, text, otlp_proto_log, otlp_proto_metric, otlp_proto_trace). |
| timeout | string | 60s | No | Timeout for the Pub/Sub client to wait for messages. |
| client_id | string | none | No | Client ID used by Pub/Sub for load balancing decisions. |
| user_agent | string | none | No | User agent used by the Pub/Sub client to connect to the service. |
Example Configuration
{
"subscription": "projects/my-project/subscriptions/my-sub", // required
"encoding": "googlecloudlogentry", // required, default: "googlecloudlogentry"
"timeout": "60s", // default: "60s"
"client_id": "", // default: none
"user_agent": "", // default: none
}