Repository navigation
Release v22.137.0
Observable MongoDB queries now watch a collection on the client it belongs to, so libraries that bring their own MongoDB database can observe their collections without Arc's MongoDB configuration, still sharing one change stream per database.
Added
services.AddMongoDBWatcher()registers the sharedIMongoDBWatcheron its own, for a host or library that observes collections from its ownIMongoDatabasewithout configuring Arc's MongoDB integration. See Watch multiple collections with a shared change stream.IMongoDBWatcher.GetChanges(IMongoDatabase)gets the shared change stream of a database on its own client. A customIMongoDBWatcherimplementation must add it.
Fixed
Observe(),ObserveSingle()andObserveById()on a collection from a client other than the application's configured one now watch the deployment the collection lives on, instead of the same database name on the configured server.- An observation no longer fails when a document outside its filter is changed and cannot be read as the observed type, such as a record of a kind the filter excludes.
- Observing a collection no longer fails with
No service for type 'Cratis.Arc.MongoDB.IMongoDBWatcher' has been registeredin a host that registers only the watcher.