@mastra/google-cloud-pubsub
GoogleCloudPubSub delivers Mastra events through Google Cloud Pub/Sub topics and subscriptions. Use it when multiple Mastra processes need durable, cross-host event delivery instead of the in-process event emitter.
Installation
npm install @mastra/google-cloud-pubsub
Usage
Authenticate with Application Default Credentials or set GOOGLE_APPLICATION_CREDENTIALS before starting Mastra.
import { Mastra } from '@mastra/core/mastra';
import { GoogleCloudPubSub } from '@mastra/google-cloud-pubsub';
export const mastra = new Mastra({
pubsub: new GoogleCloudPubSub({
projectId: process.env.GCP_PROJECT_ID!,
}),
});
Documentation
Changelog
See the package changelog for version history and release notes.
Support
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.