My problem is while the loop is never terminated.
This my changeStream object:
const changeStreamIterator = userModel.User.collection.watch(filter, {
fullDocument: "default",
startAtOperationTime: startAtOperationTime,
readPreference: "primary",
});
Read results with this code:
while (await changeStreamIterator.hasNext()) {
let change = await changeStreamIterator.next();
console.log("change");
}
.
.
.
after the above code, my code not resumed.