
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Provides MongoDB persistence implementations for Rebus for
Provides transport MongoDb implementations for Rebus
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.
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);
});
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);
});
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.
To run unit test please provide a mongo instance to run test and set the connection string ino REBUS_MONGODB environment variable.
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
FAQs
MongoDB-based persistence for Rebus
We found that rebus.mongodb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.