Skip to content

Instantly share code, notes, and snippets.

@timjonesdev
Created August 16, 2019 04:25
Show Gist options
  • Select an option

  • Save timjonesdev/6e342f2dddd37b9034e13fc48bb3bafd to your computer and use it in GitHub Desktop.

Select an option

Save timjonesdev/6e342f2dddd37b9034e13fc48bb3bafd to your computer and use it in GitHub Desktop.
The error encountered when trying to watch a Change Stream on a MongoDB instance that is not part of a replica set.
com.mongodb.MongoCommandException:
Command failed with error 40573 (Location40573):
'The $changeStream stage is only supported on replica sets' on server localhost:27017.
The full response is:
{
"ok" : 0.0,
"errmsg" : "The $changeStream stage is only supported on replica sets",
"code" : 40573,
"codeName" : "Location40573"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment