Customize collection names in MongoDB

We would like to customize the name of the MongoDB collections for outbox records and saga data. Unfortunately, I could not find anything about this in the documentation. However, I managed to customize the collection name using the CompatibilitySettings:

// ...
.UsePersistence<MongoPersistence>()
.CommunityPersistenceCompatibility()
.CollectionNamingConvention(type => "...");

Since this setting is under “CommunityPersistenceCompatibility” and it does not seem to be documented anywhere, I am wondering, if I should use this approach, though. How likely is it that this settings option is being changed or removed?

Hi @samuel_bittmann

There are no plans to change the compatibility settings.

If we do ever make API changes to those classes, we will make sure to follow proper breaking changes guidelines by first releasing a version that warns of upcoming changes and includes a migration guide, then the next version will throw an error, and only in the version after that will the classes be removed.

So you’re safe to use those classes, and if we do plan to remove/change them you will have plenty warning and help to migrate away from them.

@samuel_bittmann,

You can find more details on the release policy and the deprecation guidance in our documentation.

@WilliamBZA and @mauroservienti : Great, thank you for your replies and reassurances. In that case, I will go forward with this approach.