NATS.io .NET C# Client Library JetStream Pre-Release

Scott Fauerbach — July 26, 2021

A pre-release of JetStream support has just been made available for the NATS .NET C# Client Library!

The package NATS.Client 0.14.0-pre1 has been published on NuGet Gallery.

You can follow progress and provide feedback via the Add Jetstream Connection/Client APIs GitHub Issue.

Code Starting Points

These are the important interfaces for you to get familiar with.

IConnection has new methods which allow you to work with JetStream.

CreateJetStreamManagementContext(...) gets an implementation of IJetStreamManagement , the interface that provides stream management functions.

CreateJetStreamContext(...) gets an implementation of IJetStream , the interface that contains the methods to publish and to create subscriptions.

IJetStreamSubscription.cs contains the subscription interfaces:

  • IJetStreamPushSyncSubscription
  • IJetStreamPushAsyncSubscription
  • IJetStreamPullSubscription

Example Code

Here are some sample projects that can help you get started.

You will also find code examples in the Integration Tests . Look for the files TestJetStream*.cs

More examples are on the way.

About the Author

Scott Fauerbach is a member of the engineering team at Synadia Communications .


Back to Blog