BareWire.Transport.Google.PubSub 2.0.4

dotnet add package BareWire.Transport.Google.PubSub --version 2.0.4
                    
NuGet\Install-Package BareWire.Transport.Google.PubSub -Version 2.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BareWire.Transport.Google.PubSub" Version="2.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BareWire.Transport.Google.PubSub" Version="2.0.4" />
                    
Directory.Packages.props
<PackageReference Include="BareWire.Transport.Google.PubSub" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BareWire.Transport.Google.PubSub --version 2.0.4
                    
#r "nuget: BareWire.Transport.Google.PubSub, 2.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BareWire.Transport.Google.PubSub@2.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BareWire.Transport.Google.PubSub&version=2.0.4
                    
Install as a Cake Addin
#tool nuget:?package=BareWire.Transport.Google.PubSub&version=2.0.4
                    
Install as a Cake Tool

BareWire.Transport.Google.PubSub

Google Cloud Pub/Sub transport adapter for BareWire. Implements ITransportAdapter using the low-level PublisherServiceApiClient / SubscriberServiceApiClient from Google.Cloud.PubSub.V1 3.x.

Capabilities

Capability Status Notes
OrderingKeys Declared (R5.1) BW-OrderingKey header passed through to PubsubMessage.OrderingKey. Full CorrelationId→ordering key mapping in R5.2.
BatchReceive Active Pull supports maxMessages > 1.
DlqNative Implemented (R5.3) DeadLetterPolicy applied to subscriptions during topology deployment when bw.pubsub.dead-letter-topic / bw.pubsub.max-delivery-attempts arguments are set. The subscription's service account requires roles/pubsub.publisher on the dead-letter topic (environment config, verified in R5.4).
FlowControl Active MaxOutstandingMessages / MaxOutstandingBytes map 1:1 to FlowControlOptions.

Configuration

services.AddBareWirePubSub(cfg =>
{
    cfg.ProjectId("my-gcp-project");
    cfg.UseApplicationDefaultCredentials();  // default — uses Google ADC
    cfg.AckDeadline(TimeSpan.FromSeconds(60));
    cfg.MaxOutstandingMessages(1000);
    cfg.MaxInFlightMessages(100);
});

Service account JSON key

services.AddBareWirePubSub(cfg =>
{
    cfg.ProjectId("my-gcp-project");
    cfg.UseServiceAccountJson("/etc/secrets/sa.json");  // file path
    // or: cfg.UseServiceAccountJsonContent(jsonString); // inline (never log the content)
});

Local emulator

services.AddBareWirePubSub(cfg =>
{
    cfg.ProjectId("test-project");
    cfg.UseEmulator("localhost:8085");  // sets AuthMode = EmulatorInsecure
});

Flow control 1:1 mapping

BareWire FlowControlOptions Pub/Sub equivalent
MaxInFlightMessages (registry limit) In-flight registry size — messages above this are not pulled
MaxOutstandingMessages (options) maxMessages per Pull call — limits outstanding message count
InternalQueueCapacity (flow control) Bounded Channel<InboundMessage> capacity

Header mapping

BareWire headers are stored in PubsubMessage.Attributes (string→string). Pub/Sub limits:

  • Max 100 attributes per message
  • Key ≤ 256 UTF-8 bytes; value ≤ 1024 UTF-8 bytes

Violations throw BareWireTransportException with only counts/lengths — never key text or values (SEC-4).

Ordering keys (R5.1)

If the inbound or outbound message has a BW-OrderingKey header, it is passed through to/from PubsubMessage.OrderingKey. Full CorrelationId→ordering key mapping is implemented in R5.2.

Security note: Do not log ServiceAccountJsonPath file contents. The path itself is safe to log; the key material is not.

Roadmap

  • R5.2 — Full ordering key support: CorrelationId → PubsubMessage.OrderingKey, resume-on-failure (ResumePublish).
  • R5.3 — Dead-letter topic wiring: DeadLetterPolicy applied to subscriptions from bw.pubsub.dead-letter-topic / bw.pubsub.max-delivery-attempts topology arguments. Done.
  • R5.4 — Integration tests against the Pub/Sub emulator via Aspire.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on BareWire.Transport.Google.PubSub:

Package Downloads
BareWire.Benchmarks

Package Description

BareWire.Google.PubSub

Single-call registration bundle for BareWire with the Google Cloud Pub/Sub transport. References both the BareWire core and BareWire.Transport.Google.PubSub and exposes AddBareWireWithPubSub.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.4 172 6/29/2026
2.0.3 138 6/28/2026
2.0.2 132 6/28/2026
2.0.1 132 6/28/2026
2.0.0 150 6/27/2026
1.5.1 142 6/23/2026
1.4.0 124 6/18/2026