ItIsYe
ItIsYe

Reputation: 9

Using DocumentDB change stream on multiple collections?

I'm implementing python an application to capture change on DocumentDB using Change Stream feature my design is watching change on all collections in the target database and publish to some message queue to do some processing.

My question is currently DocumentDB support MongoDB API version 3.6 which not support watch change on DB level. Is there a way to watch the change stream on the DB level on the current DocumentDB version.

Upvotes: 0

Views: 897

Answers (2)

Mihai A
Mihai A

Reputation: 406

Since October/November 2020, Amazon DocumentDB supports change streams at the database level. The release notes were posted here and here. The documentation has examples for how to watch changes for all collections in a database.

Upvotes: 0

herbertgoto
herbertgoto

Reputation: 359

You can enable change streams at the collection, database, and cluster level. However, at the moment to seek for the changes it happens at the collection level.

You need to setup your code to seek for changes in every collection that is being watched.

Upvotes: 2

Related Questions