DotPulsar.Extensions.Resiliency adds resiliency extensions working with Pulsar.
License
—
Deps
8
Install Size
—
Vulns
✓ 0
Published
Nov 12, 2025
$ dotnet add package DotPulsar.Extensions.ResiliencyProvides resiliency extensions for DotPulsar. This includes an implementation of dead letter queue as well as integration with Polly.
dotnet add package DotPulsar.Extensions.Resiliency
Using the DLQ implementation:
await using var dlq = new DeadLetterPolicy(
client.NewProducer().Topic("...-DLQ"),
client.NewProducer().Topic("...-RETRY"));
...
await dlq.ReconsumeLater(message);
You will need to have a separate consumer set up to listen to the retry topic in order to process the retry messages. If those messages fail, then you will need to re-submit them to the DeadLetterPolicy to mark them as retry or dead.
Using Polly to create resilient producers:
await using var producer = client.NewProducer(Schema.String)
.Topic("...")
.CreateResilient(static pipeline => {
pipeline.AddResilientProducerDefaults(configureRetry: static options => {
options.MaxRetryAttempts = 3;
});
});
This project is licensed under Apache License, Version 2.0.