Synadia.Orbit.JetStream.Extensions
1.0.0-preview.2
Prefix Reserved
See the version list below for details.
dotnet add package Synadia.Orbit.JetStream.Extensions --version 1.0.0-preview.2
NuGet\Install-Package Synadia.Orbit.JetStream.Extensions -Version 1.0.0-preview.2
<PackageReference Include="Synadia.Orbit.JetStream.Extensions" Version="1.0.0-preview.2" />
<PackageVersion Include="Synadia.Orbit.JetStream.Extensions" Version="1.0.0-preview.2" />
<PackageReference Include="Synadia.Orbit.JetStream.Extensions" />
paket add Synadia.Orbit.JetStream.Extensions --version 1.0.0-preview.2
#r "nuget: Synadia.Orbit.JetStream.Extensions, 1.0.0-preview.2"
#:package Synadia.Orbit.JetStream.Extensions@1.0.0-preview.2
#addin nuget:?package=Synadia.Orbit.JetStream.Extensions&version=1.0.0-preview.2&prerelease
#tool nuget:?package=Synadia.Orbit.JetStream.Extensions&version=1.0.0-preview.2&prerelease
JetStream Extensions
These are utilities extends NATS JetStream client functionality.
Direct batch
Direct batch is beta. It only works with the 2.11.x NATS Server.
The direct batch functionality leverages the direct message capabilities introduced in NATS Server 2.11 The functionality is described in ADR-31.
// dotnet add package nats.net
// dotnet add package Synadia.Orbit.JetStream.Extensions --prerelease
await using var client = new NatsClient();
INatsJSContext js = client.CreateJetStreamContext();
await js.CreateStreamAsync(new StreamConfig(name, [suject]) { AllowDirect = true }, ct);
for (int i = 0; i < 10; i++)
{
await js.PublishAsync(subject: suject, i, cancellationToken: ct);
}
StreamMsgBatchGetRequest request = new()
{
Batch = 8,
Seq = 1,
};
int count = 0;
await foreach (NatsMsg<int> msg in js.GetBatchDirectAsync<int>(name, request, cancellationToken: ct))
{
Assert.Equal(count++, msg.Data);
Console.WriteLine($"GetBatchDirectAsync: {msg.Data}");
}
Assert.Equal(8, count);
Single Scheduled Message
A stream can be configured to allow scheduled messages. A scheduled message is a message published to a subject that will in turn publish the message to a target subject at a specified time in the future. See also ADR-51: Single scheduled message for more details. This feature requires NATS Server 2.12 or later.
// dotnet add package nats.net
// dotnet add package synadia.orbit.jetstream.extensions --prerelease
await using var client = new NatsClient();
var js = client.CreateJetStreamContext();
Console.WriteLine("Create stream");
var stream = await js.CreateStreamAsync(new StreamConfig("SCHEDULING_STREAM", ["scheduling.>", "events.>"])
{
AllowMsgSchedules = true,
AllowMsgTTL = true,
});
// Schedule a message for 10 seconds from now
var scheduleAt = DateTimeOffset.UtcNow.AddSeconds(10);
var schedule = new NatsMsgSchedule(scheduleAt, "events.it_is_time")
{
Ttl = TimeSpan.FromSeconds(15), // Optional
};
Console.WriteLine($"Scheduling message for: {scheduleAt:yyyy-MM-ddTHH:mm:ss}Z");
var ack = await js.PublishScheduledAsync(
subject: "scheduling.check_later",
data: $"message for later {scheduleAt}",
schedule: schedule);
ack.EnsureSuccess();
Console.WriteLine($"Published scheduled message, seq={ack.Seq}");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- IndexRange (>= 1.0.3)
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- NATS.Client.JetStream (>= 2.6.10)
- System.Buffers (>= 4.5.1)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
- System.Memory (>= 4.5.5)
- System.Text.Json (>= 8.0.5)
- System.Threading.Channels (>= 8.0.0)
-
.NETStandard 2.1
- NATS.Client.JetStream (>= 2.6.10)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
- System.Text.Json (>= 8.0.5)
- System.Threading.Channels (>= 8.0.0)
-
net10.0
- NATS.Client.JetStream (>= 2.6.10)
-
net8.0
- NATS.Client.JetStream (>= 2.6.10)
-
net9.0
- NATS.Client.JetStream (>= 2.6.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.5 | 59 | 5/1/2026 |
| 1.0.0-preview.4 | 73 | 3/17/2026 |
| 1.0.0-preview.3 | 71 | 2/23/2026 |
| 1.0.0-preview.2 | 176 | 11/27/2025 |
| 1.0.0-preview.1 | 635 | 2/27/2025 |