DotPulsar
v5.0.0-rc.1Pre-release
net8.0net9.0.NETStandard2.0.NETStandard2.1
The official .NET client library for Apache Pulsar
Published
Oct 20, 2025
1y ago
Total Downloads
2.7M
2,666,590
Install
dotnet add package DotPulsar --version 5.0.0-rc.1
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard |
README
DotPulsar
Let's take a look at a "Hello world" example, where we first set up a consumer and then produce a message. Note that the topic and subscription will be created if they don't exist.
Creating the client
Before creating readers, consumers, and producers, we need to create a client.
using DotPulsar;
using DotPulsar.Extensions;
await using var client = PulsarClient.Builder().Build(); // Connecting to pulsar://localhost:6650
Consuming
await using var consumer = client.NewConsumer(Schema.String)
.SubscriptionName("MySubscription")
.Topic("persistent://public/default/mytopic")
.InitialPosition(SubscriptionInitialPosition.Earliest)
.Create();
await foreach (var message in consumer.Messages())
{
Console.WriteLine($"Received: {message.Value()}");
await consumer.Acknowledge(message);
}
Producing
await using var producer = client.NewProducer(Schema.String).Topic("persistent://public/default/mytopic").Create();
var messageId = await producer.Send("Hello World");
Changes from Previous Version
v5.0.0-alpha.1v5.0.0-rc.1
Removed Frameworks
net6.0net7.0
Removed Dependencies
Google.Protobuf(net6.0)
HashDepot(net6.0)
Microsoft.Extensions.ObjectPool(net6.0)
System.IO.Pipelines(net6.0)
Google.Protobuf(net7.0)
HashDepot(net7.0)
Microsoft.Extensions.ObjectPool(net7.0)
System.IO.Pipelines(net7.0)
HashDepot(net8.0)
HashDepot(net9.0)
System.IO.Pipelines(net9.0)
HashDepot(.NETStandard2.0)
HashDepot(.NETStandard2.1)
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 4 target frameworks; confirm the exact target used by your application.The published metadata declares 17 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.