Skip to main content

Google PubSub Configuration

To use Google PubSub as a message broker in Ductape, provide the following configuration for each environment:

const googlePubSubConfig = {
projectId: 'your-gcp-project-id', // Google Cloud Project ID
topicName: 'my-topic', // Pub/Sub topic name
subscriptionName: 'my-subscription', // (Optional) Subscription name
keyFilename: '/path/to/keyfile.json', // Path to service account key file
};
FieldTypeRequiredDescription
projectIdstringYesGoogle Cloud Project ID
topicNamestringYesName of the Pub/Sub topic
subscriptionNamestringNoName of the Pub/Sub subscription
keyFilenamestringYesPath to the service account key file

Best Practices:

  • Use separate topics/subscriptions for each environment.
  • Secure your service account key and restrict permissions.
  • Monitor Pub/Sub message throughput and error rates.

See Also