Rebus.MongoDb 9.0.0

dotnet add package Rebus.MongoDb --version 9.0.0
                    
NuGet\Install-Package Rebus.MongoDb -Version 9.0.0
                    
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="Rebus.MongoDb" Version="9.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rebus.MongoDb" Version="9.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Rebus.MongoDb" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rebus.MongoDb --version 9.0.0
                    
#r "nuget: Rebus.MongoDb, 9.0.0"
                    
#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.
#addin nuget:?package=Rebus.MongoDb&version=9.0.0
                    
Install Rebus.MongoDb as a Cake Addin
#tool nuget:?package=Rebus.MongoDb&version=9.0.0
                    
Install Rebus.MongoDb as a Cake Tool

Rebus.MongoDb

install from nuget

Provides MongoDB persistence implementations for Rebus for

  • sagas
  • subscriptions
  • timeouts

Provides transport MongoDb implementations for Rebus

Saga Data

You must ensure to map GuidRepresentation for classes inheriting from ISagaData as this is required for any Guid field in MongoDB.Driver from 3.x and beyond.

Remember, if you have existing saga data from prior to MongoDB.Driver 3.x, this will use GuidRepresentation.CSharpLegacy so you must take care to ensure you map it appropriately.

Inheriting from ISagaData

If your saga data class inherits from the ISagaData interface, you can either use attributes:

public class MySagaData : ISagaData
{
    [BsonGuidRepresentation(GuidRepresentation.Standard)]
    public Guid Id { get; set; } 
    public int Revision { get; set; }
}

Or you can create a BsonClassMap:

BsonClassMap.RegisterClassMap<MySagaData>(map =>
{
    map.MapIdMember(obj => obj.Id).SetSerializer(new GuidSerializer(GuidRepresentation.Standard));
    map.MapMember(obj => obj.Revision);
});

Inheriting from SagaData

If you inherit from SagaData, you can just create a BsonClassMap which will be applied to all classes inheriting from the base class:

BsonClassMap.RegisterClassMap<SagaData>(map =>
{
    map.MapIdMember(obj => obj.Id).SetSerializer(new GuidSerializer(GuidRepresentation.Standard));
    map.MapMember(obj => obj.Revision);
});

Global serializer

A third option, if you prefer to configure a representation globally is:

BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard));

Remember, this will apply it globally for any code using MongoDB.Driver, including your own. So this is only an option if all your code uses same representation across all collections.

Unit Tests

To run unit test please provide a mongo instance to run test and set the connection string ino REBUS_MONGODB environment variable.

Local nuget pack

To manually create a nuget package specifying manually the version you can use this commandline.

dotnet pack Rebus.MongoDb\Rebus.MongoDb.csproj -o c:\target_directory -c release /p:PackageVersion=6.0.1011 /p:AssemblyVersion=6.0.0 /p:FileVersion=6.0.0 /p:InformationalVersion=6.0.0-__SHA_OF_COMMIT__

//then you need to push
dotnet nuget push .\Rebus.MongoDb.6.0.1011.nupkg -s https://pkgs.dev.azure.com/xxxxx/_packaging/__packageName__/nuget/v3/index.json --api-key az

alternate text is missing from this package README image


Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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.  net9.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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
9.0.0 9,316 12/18/2024
8.1.0 23,810 8/21/2024
8.0.0 55,458 11/15/2023
8.0.0-alpha04 2,149 8/24/2023
8.0.0-alpha03 192 6/12/2023
8.0.0-alpha02 172 6/6/2023
8.0.0-alpha01 206 3/29/2023
7.0.0-b3 37,034 8/1/2022
7.0.0-b2 219 8/1/2022
7.0.0-b1 3,174 9/22/2021
6.0.5 231,157 4/22/2020
6.0.4 7,817 3/24/2020
6.0.0 7,468 2/5/2020
6.0.0-b3 577 1/16/2020
6.0.0-b2 738 9/8/2019
5.1.0 1,528 1/16/2020
5.1.0-b1 563 1/15/2020
5.0.0 44,793 10/8/2018
5.0.0-b02 1,444 6/22/2018
5.0.0-b01 1,178 6/22/2018
4.0.0 5,904 8/15/2017
4.0.0-b06 1,084 8/13/2017
4.0.0-b05 1,174 6/13/2017
4.0.0-b04 1,091 5/18/2017
4.0.0-b03 1,124 5/17/2017
4.0.0-b01 1,169 3/21/2017
3.0.0 2,730 1/5/2017
2.0.0 2,007 9/20/2016
2.0.0-b01 1,142 9/9/2016
2.0.0-a1 1,115 9/1/2016
0.99.74 1,470 8/29/2016
0.99.73 1,475 8/12/2016
0.99.72 1,501 8/4/2016
0.99.71 1,749 8/3/2016
0.99.70 1,640 7/29/2016
0.99.68 1,458 7/18/2016
0.99.67 1,559 7/1/2016
0.99.66 1,547 6/28/2016
0.99.65 1,543 6/23/2016
0.99.64 1,490 6/22/2016
0.99.63 1,476 6/21/2016
0.99.62 1,517 6/17/2016
0.99.61 1,443 6/17/2016
0.99.60 1,588 6/15/2016
0.99.59 1,470 6/3/2016
0.99.58 1,521 5/24/2016
0.99.57 1,528 5/22/2016
0.99.56 1,497 5/22/2016
0.99.55 1,475 5/16/2016
0.99.54 1,456 5/12/2016
0.99.53 1,435 5/12/2016
0.99.52 1,489 5/11/2016
0.99.51 1,510 5/9/2016
0.99.50 1,501 4/13/2016
0.99.48 1,467 4/6/2016
0.99.47 1,431 3/31/2016
0.99.46 1,413 3/30/2016
0.99.45 1,402 3/29/2016
0.99.44 1,423 3/26/2016
0.99.43 1,437 3/26/2016
0.99.42 1,512 3/22/2016
0.99.41 1,531 3/17/2016
0.99.40 1,492 3/15/2016
0.99.39 1,502 3/14/2016
0.99.38 1,489 3/9/2016
0.99.37 1,411 3/9/2016
0.99.36 1,467 3/3/2016
0.99.35 1,570 2/22/2016
0.99.34 1,515 2/19/2016
0.99.33 1,544 2/12/2016
0.99.32 1,505 2/10/2016
0.99.31 1,501 2/8/2016
0.99.30 1,429 2/5/2016
0.99.29 1,499 2/2/2016
0.99.27 1,488 1/28/2016
0.99.26 1,475 1/27/2016
0.99.25 1,468 1/22/2016
0.99.24 1,485 1/18/2016
0.99.23 1,472 12/18/2015
0.99.22 1,504 12/18/2015
0.99.21 1,458 12/11/2015
0.99.20 1,499 12/10/2015
0.99.19 1,513 12/8/2015
0.99.18 1,641 12/7/2015
0.99.17 1,466 12/7/2015
0.99.16 1,819 11/30/2015
0.99.14 1,604 11/24/2015
0.99.13 1,594 11/23/2015
0.99.12 1,634 11/17/2015
0.99.11 1,554 11/17/2015
0.99.10 1,524 11/11/2015
0.99.9 1,520 11/5/2015
0.99.8 1,515 11/5/2015
0.99.7 1,566 10/29/2015
0.99.5 1,517 10/27/2015
0.99.4 1,518 10/27/2015
0.99.2 1,553 10/12/2015
0.99.1 1,897 10/8/2015
0.99.0 1,644 10/7/2015
0.98.12 1,584 9/17/2015
0.98.11 1,580 9/17/2015
0.98.10 1,529 9/16/2015
0.98.9 1,466 9/14/2015
0.98.8 1,564 9/13/2015
0.98.7 1,571 9/9/2015
0.98.6 1,563 9/7/2015
0.98.5 1,545 9/3/2015
0.98.4 1,521 9/3/2015
0.98.3 1,570 9/1/2015
0.98.2 1,581 8/27/2015
0.98.1 1,566 8/27/2015
0.98.0 1,542 8/26/2015
0.97.0 1,446 8/25/2015
0.96.0 1,565 8/24/2015
0.95.0 1,446 8/20/2015
0.94.0 1,577 8/19/2015
0.93.0 1,446 8/19/2015
0.92.4 1,459 8/17/2015
0.92.3 1,948 8/13/2015
0.92.2 1,962 8/12/2015
0.92.1 1,924 8/12/2015
0.92.0 1,869 8/11/2015
0.91.0 1,615 8/11/2015
0.90.9 1,579 8/10/2015
0.90.8 1,828 8/9/2015
0.90.7 1,777 8/5/2015
0.90.6 1,858 8/4/2015
0.90.5 1,857 8/4/2015
0.90.4 1,658 8/2/2015
0.90.3 1,728 8/2/2015
0.90.2 1,711 7/31/2015
0.90.1 1,606 7/29/2015
0.90.0 1,687 7/29/2015
0.84.0 1,895 5/15/2015
0.83.0 1,695 4/20/2015
0.82.1 1,652 4/16/2015
0.82.0 1,692 3/19/2015
0.81.0 1,513 3/12/2015
0.80.1 1,554 3/5/2015
0.80.0 1,914 2/19/2015
0.79.0 1,734 2/6/2015
0.78.2 1,567 2/6/2015
0.78.1 1,580 2/5/2015
0.78.0 1,611 1/29/2015
0.77.1 1,489 1/23/2015
0.77.0 1,613 1/15/2015
0.76.0 1,594 1/15/2015
0.75.2 1,948 1/3/2015
0.75.1 1,981 12/21/2014
0.75.0 1,740 12/2/2014
0.74.1 1,732 12/2/2014
0.74.0 1,764 11/30/2014
0.73.0 2,102 11/6/2014
0.72.0 1,877 11/5/2014
0.71.4 1,614 10/29/2014
0.71.3 1,538 10/20/2014
0.71.2 1,529 9/30/2014
0.71.1 2,667 9/19/2014
0.71.0 2,081 8/7/2014
0.70.3 1,550 8/4/2014
0.70.2 1,521 7/31/2014
0.70.1 1,531 7/17/2014
0.69.0 1,549 6/17/2014
0.68.0 1,540 6/5/2014
0.67.0 1,493 5/20/2014
0.66.0 1,550 5/9/2014
0.65.0 1,496 4/27/2014
0.64.1 1,560 4/25/2014
0.64.0 1,678 4/20/2014
0.63.1 1,714 4/19/2014
0.63.0 1,551 3/24/2014
0.62.0 1,562 3/12/2014
0.61.1 1,473 3/5/2014
0.61.0 1,500 3/4/2014
0.60.1 1,483 3/3/2014
0.60.0 1,508 3/3/2014
0.59.0 1,579 2/26/2014
0.58.2 1,582 2/24/2014
0.58.1 1,586 2/24/2014
0.58.0 1,660 2/24/2014
0.57.0 1,664 2/18/2014
0.56.1 1,553 2/4/2014
0.56.0 1,617 1/24/2014
0.55.1 1,640 1/20/2014
0.55.0 1,598 1/20/2014
0.54.8 1,564 1/20/2014
0.54.7 1,566 1/20/2014
0.54.6 1,504 1/20/2014
0.54.5 1,557 1/20/2014
0.54.4 1,612 1/11/2014
0.54.3 1,556 1/8/2014
0.54.1 1,575 12/16/2013
0.54.0 1,563 12/10/2013
0.53.1 1,614 12/9/2013
0.53.0 1,603 12/5/2013
0.52.0 1,516 12/4/2013
0.51.1 1,627 12/3/2013
0.51.0 1,599 12/3/2013
0.50.1 1,636 11/15/2013
0.50.0 1,593 11/15/2013
0.49.0 1,566 11/15/2013
0.48.0 1,581 11/12/2013
0.47.0 1,567 11/6/2013
0.46.0 1,656 10/29/2013
0.45.0 1,622 10/21/2013
0.44.5 1,624 10/11/2013
0.44.4 1,569 10/7/2013
0.44.3 1,594 10/4/2013
0.44.2 1,599 10/4/2013
0.44.1 1,588 10/2/2013
0.44.0 1,577 10/2/2013
0.43.1 1,667 9/24/2013
0.43.0 1,723 9/17/2013
0.42.0 1,565 9/17/2013
0.41.0 1,591 9/10/2013
0.40.1 1,574 9/9/2013
0.40.0 1,555 9/2/2013
0.39.0 1,553 8/29/2013
0.38.1 1,715 8/28/2013
0.38.0 1,555 8/28/2013
0.37.0 1,553 8/26/2013
0.36.1 1,508 8/25/2013
0.36.0 1,531 8/25/2013
0.35.6 1,571 8/20/2013
0.35.5 1,554 8/20/2013
0.35.4 1,586 8/19/2013
0.35.3 1,553 8/17/2013
0.35.2 1,563 8/15/2013
0.35.1 1,590 8/14/2013
0.35.0 1,618 8/6/2013
0.34.7 1,594 8/5/2013
0.34.6 1,626 8/5/2013
0.34.5 1,601 8/2/2013
0.34.3 1,554 7/29/2013
0.34.2 1,662 7/29/2013
0.34.1 1,760 7/27/2013
0.34.0 1,846 7/4/2013
0.33.0 1,630 6/14/2013
0.32.5 1,683 6/2/2013
0.32.4 1,607 5/28/2013
0.32.3 1,593 5/23/2013
0.32.1 1,562 5/15/2013
0.32.0 1,603 4/23/2013
0.31.1 1,701 4/2/2013
0.31.0 1,554 4/2/2013
0.30.7 1,609 3/25/2013
0.30.4 1,591 3/7/2013
0.30.3 1,594 3/7/2013
0.30.2 1,612 3/7/2013
0.30.1 1,629 3/6/2013
0.30.0 1,586 3/5/2013
0.29.9 1,573 3/5/2013
0.29.8 1,639 3/5/2013
0.29.7 1,644 2/28/2013
0.29.6 1,642 2/20/2013
0.29.5 1,578 2/20/2013
0.29.4 1,509 2/8/2013
0.29.3 1,584 2/6/2013
0.29.1 1,534 2/5/2013
0.29.0-alpha 1,118 1/22/2013
0.28.4 1,582 1/21/2013
0.28.3 1,672 1/8/2013
0.28.2 1,563 1/8/2013
0.28.1 1,611 12/27/2012
0.28.0 1,592 12/27/2012
0.27.1 1,848 12/4/2012
0.27.0 2,001 12/4/2012
0.26.1 1,792 12/4/2012
0.26.0 1,898 11/20/2012
0.25.9 1,859 11/20/2012
0.25.8 1,851 11/19/2012
0.25.7 1,783 11/18/2012
0.25.5 1,821 11/15/2012
0.25.3 1,814 11/13/2012
0.25.2 1,795 11/13/2012
0.25.1 1,853 11/13/2012
0.25.0 1,782 11/7/2012
0.24.9 1,796 11/7/2012
0.24.8 1,763 11/7/2012
0.24.7 1,787 11/6/2012
0.24.6 1,720 11/1/2012
0.24.5 1,820 10/30/2012
0.24.4 1,793 10/30/2012
0.24.3 1,755 10/26/2012
0.24.2 1,712 10/26/2012
0.24.1 1,737 10/26/2012
0.24.0 1,764 10/25/2012
0.23.9 1,689 10/25/2012
0.23.8 1,727 10/25/2012
0.23.7 1,795 10/25/2012
0.23.6 1,740 10/24/2012
0.23.1 1,694 10/12/2012
0.23.0 1,684 10/10/2012
0.22.8 1,747 10/10/2012
0.22.7 1,742 10/9/2012
0.22.6 1,733 10/9/2012
0.22.5 1,768 10/3/2012
0.22.4 1,808 10/2/2012
0.22.3 1,756 10/2/2012
0.22.2 1,718 9/30/2012
0.22.1 1,709 9/26/2012
0.22.0 1,694 9/26/2012
0.21.7 1,678 9/25/2012
0.21.6 1,645 9/25/2012
0.21.5 1,680 9/11/2012
0.21.4 1,687 9/10/2012
0.21.3 1,677 9/10/2012
0.21.2 1,660 9/10/2012
0.21.1 1,698 9/10/2012
0.21.0 1,790 9/7/2012
0.20.9 1,647 9/7/2012
0.20.8 1,734 9/6/2012
0.20.7 1,720 9/6/2012
0.20.6 1,636 9/6/2012
0.20.3 1,637 9/4/2012
0.20.2 1,640 9/4/2012
0.19.7 1,703 8/29/2012
0.19.6 1,652 8/28/2012
0.19.5 1,683 8/28/2012
0.19.4 1,690 8/28/2012
0.19.3 1,705 8/28/2012
0.19.2 1,712 8/28/2012
0.19.1 1,649 8/26/2012
0.18.6 1,740 8/23/2012
0.16.0 1,827 8/20/2012
0.15.9-alpha 1,180 8/14/2012
0.15.8-alpha 1,209 8/8/2012
0.15.7-alpha 1,188 8/8/2012
0.15.6-alpha 1,157 8/8/2012
0.15.4-alpha 1,295 8/7/2012
0.15.3-alpha 1,173 8/7/2012
0.15.2-alpha 1,182 8/7/2012
0.15.1-alpha 1,159 8/2/2012
0.15.0-alpha 1,189 8/1/2012
0.14.0-alpha 1,124 7/30/2012
0.13.0-alpha 1,206 7/14/2012
0.12.9-alpha 1,195 6/18/2012
0.12.8-alpha 1,184 6/18/2012
0.12.7-alpha 1,189 6/13/2012
0.12.6-alpha 1,234 6/8/2012
0.12.5-alpha 1,180 6/5/2012
0.12.4-alpha 1,217 6/5/2012
0.12.3-alpha 1,167 6/1/2012
0.12.2-alpha 1,208 5/31/2012
0.12.1-alpha 1,229 5/30/2012
0.11.10-alpha 1,221 5/30/2012
0.11.9-alpha 1,185 5/30/2012
0.11.8-alpha 1,262 5/30/2012
0.11.7-alpha 1,160 5/30/2012
0.11.6-alpha 1,162 5/29/2012
0.11.5-alpha 1,232 5/22/2012
0.11.4-alpha 1,239 5/22/2012
0.11.3-alpha 1,254 5/15/2012
0.11.2-alpha 1,174 5/8/2012
0.11.1-alpha 1,166 5/8/2012
0.11.0-alpha 1,187 5/8/2012
0.10.9-alpha 1,241 4/10/2012
0.10.8-alpha 1,228 3/21/2012
0.10.7-alpha 1,293 3/20/2012
0.10.6-alpha 1,167 3/17/2012
0.10.5-alpha 1,238 3/16/2012
0.10.4-alpha 1,233 3/16/2012
0.10.3-alpha 1,237 3/15/2012
0.10.1-alpha 1,210 3/15/2012
0.9.1-alpha 1,238 2/26/2012