MongoDB.ReactiveChangeStream 1.0.1

dotnet add package MongoDB.ReactiveChangeStream --version 1.0.1
NuGet\Install-Package MongoDB.ReactiveChangeStream -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MongoDB.ReactiveChangeStream" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MongoDB.ReactiveChangeStream --version 1.0.1
#r "nuget: MongoDB.ReactiveChangeStream, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MongoDB.ReactiveChangeStream as a Cake Addin
#addin nuget:?package=MongoDB.ReactiveChangeStream&version=1.0.1

// Install MongoDB.ReactiveChangeStream as a Cake Tool
#tool nuget:?package=MongoDB.ReactiveChangeStream&version=1.0.1

MongoDB.ReactiveChangeStream

Extension for MongoDB C# Driver to handle MongoDB Change Streams as an IObservale MongoDB Change Streams are a feature that allow the database to notify subscribers for any change, more about Change Streams

Installation

First, install the MongoDB.ReactiveChangeStream Nuget package into your app

Install-Package MongoDB.ReactiveChangeStream

Example Usage

using System.Reactive.Linq;
using MongoDB.Bson;
using MongoDB.Driver;
using MongoDB.ReactiveChangeStream;

var client = new MongoClient("mongodb://localhost:27017/foo?replicaSet=rs0");

var database = client.GetDatabase("foo");

var collection = database.GetCollection<BsonDocument>("bar");

var changeObservable = collection.CreateObservableChangeStream(filter =>
    filter.OperationType == ChangeStreamOperationType.Delete ||
    filter.OperationType == ChangeStreamOperationType.Insert ||
    filter.OperationType == ChangeStreamOperationType.Update ||
    filter.OperationType == ChangeStreamOperationType.Replace);

changeObservable
    .Buffer(TimeSpan.FromSeconds(5))
    .Do(changes =>
    {
        // Do something
    })
    .Subscribe();
Note:

Make sure you connecting to a MongoDB instance with Replica Set Enabled, as Change Streams require it. read more about how to initialize a Replica Set here...

Product 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 was computed.  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. 
.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 was computed. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1 807,031 5/30/2022
1.0.0 6,785 5/27/2022