Skip to main content
DotPulsar package icon

DotPulsar

v5.3.4Latest Stable
net10.0net8.0net9.0.NETStandard2.0.NETStandard2.1

The official .NET client library for Apache Pulsar

Published
Oct 9, 2026
9d ago
Total Downloads
2.7M
2,666,590

Install

dotnet add package DotPulsar --version 5.3.4
ProductVersions
.NET
net10.0net8.0net9.0
.NET Standard
netstandard2.0netstandard2.1

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

No structural changes between v5.3.4-rc.1 and v5.3.4.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 5 target frameworks; confirm the exact target used by your application.The published metadata declares 21 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.