Skip to content

Commit baa1721

Browse files
committed
Update mongodb-change-streams.md
1 parent 99e8ec5 commit baa1721

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

articles/cosmos-db/mongodb-change-streams.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,6 @@ var cursor = db.coll.watch(
112112
{ fullDocument: "updateLookup" });
113113

114114
```
115-
```java
116-
Bson match=Aggregates.match(Filters.in("operationType",
117-
asList("update", "replace", "insert")));
118-
Bson project=Aggregates.project(fields(include("_id","ns","documentKey","fullDocument")));
119-
120-
List<Bson> pipeline =Arrays.asList(match,project);
121-
MongoChangeStreamCursor<ChangeStreamDocument<org.bson.Document>> cursor =
122-
collection.watch(pipeline).fullDocument(FullDocument.UPDATE_LOOKUP).cursor();
123-
124-
while (cursor.hasNext()) {
125-
System.out.println(cursor.next());
126-
}
127-
cursor.close();
128-
```
129-
Refer [here](https://github.com/Azure-Samples/azure-cosmos-db-mongodb-java-changestream), for full sample in Java.
130115
## Current limitations
131116

132117
The following limitations are applicable when using change streams:

0 commit comments

Comments
 (0)