Skip to main content
Version: 3.3.x

Initialize C# client

This section introduces some hands-on examples to initialize the Pulsar C# client.

The following example shows how to create a Pulsar C# client connected to localhost.

using DotPulsar;

var client = PulsarClient.Builder().Build();

To create a Pulsar C# client by using the builder, you can specify the following options.

OptionDescriptionDefault
ServiceUrlSet the service URL for the Pulsar cluster.pulsar://localhost:6650
RetryIntervalSet the time to wait before retrying an operation or a reconnection.3s