Skip to content

Add the Google Cloud Pub/Sub transport - #6088

Draft
andreasohlund wants to merge 6 commits into
masterfrom
google-pub-sub
Draft

andreasohlund wants to merge 6 commits into
masterfrom
google-pub-sub

Conversation

@andreasohlund

@andreasohlund andreasohlund commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Adds Google Cloud Pub/Sub as a transport for the primary, audit, and monitoring instances, using NServiceBus.Transport.GooglePubSub.

Not ready to merge:

  • The package reference is 0.0.0-alpha.0.64, built from https://github.com/Particular/NServiceBus.Transport.GooglePubSub/pull/67 and not on any feed yet, so CI cannot restore. The transport needs a prerelease on feedz for CI, and 1.0.0 on nuget.org before this merges.
  • The GooglePubSub CI category needs the GCP_WORKLOAD_IDENTITY_PROVIDER, GCP_SERVICE_ACCOUNT, and GOOGLE_CLOUD_PROJECT repository variables, and a service account with roles/pubsub.editor.

Behavior

  • The connection string accepts ProjectId, ResourceNamePrefix, ServiceEndpoint, and EmulatorDetection, all optional, and rejects any other key. The transport ignores the emulator unless EmulatorDetection selects it. Credentials come only from Application Default Credentials, because ServiceControl creates its ingestion, retry, and throughput receivers without a service provider.
  • All instances use ReceiveOnly, the strongest mode the transport supports.
  • The monitoring instance reports no queue lengths yet. Pub/Sub has no backlog API, so a follow-up will read them from Cloud Monitoring.
  • The transport throws for delayed sends and saga timeouts. ServiceControl sends no delayed messages, disables sagas, and sets delayed retries to zero.
  • The running primary has installers disabled, and the transport throws on a publish to a missing topic. The customization declares each type in EventTypesPublished with Topology.Publishes, so setup creates the integration event topics. This needs https://github.com/Particular/NServiceBus.Transport.GooglePubSub/pull/67.

Microsoft.Bcl.AsyncInterfaces, Newtonsoft.Json, and System.CodeDom are now pinned, because the transport brought in versions that DuplicateAssembliesInDeploymentUnitsShouldHaveMatchingVersions rejected. The RavenDB persister moves from Newtonsoft.Json 13.0.3 to 13.0.4.

Verification

  • ServiceControl.Transports.GooglePubSub.Tests passes against the Pub/Sub emulator (20 tests). PublishedEventTopicTests fails without the Publishes calls. It has not run against a Google Cloud project.
  • Locally built container images of all three instances run against the emulator with RavenDB, the integrated ServicePulse, and three endpoints. Audit, heartbeats, metrics, custom checks, error ingestion, and a group retry work end to end. With external integrations publishing on, setup creates the event topics and a subscriber receives MessageFailed and MessageFailureResolvedByRetry. Monitoring reports a queue length of 0.
  • Packaging tests pass. The transport names approval runs only on Windows, so it has not run yet.

Docs

  • Added docs/google-pubsub-transport.md and linked it from docs/README.md.
  • Updated docs/testing.md with the CI setup and local emulator steps, docs/usage-report.md with the new key and the settings left out, and the test filter list in README.md.
  • docs/packaging.md and docs/throughput-collection.md need no change.
  • docs.particular.net needs a section in servicecontrol/transports.md once the transport has its own pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant