Skip to content

Release v22.137.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 19:43
2985ccf

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 shared IMongoDBWatcher on its own, for a host or library that observes collections from its own IMongoDatabase without 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 custom IMongoDBWatcher implementation must add it.

Fixed

  • Observe(), ObserveSingle() and ObserveById() 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 registered in a host that registers only the watcher.