I'm trying to setup the new fullDocumentBeforeChange feature introduced in MongoDB 6.0 , however I always get the following error:
MongoServerError: featureFlagClusterWideConfig not enabled
When trying to enable the feature from mongosh directly, I get the following error:
MongoServerError: Cannot set cluster parameter, gFeatureFlagClusterWideConfig is not enabled
I have followed these steps to enable this feature.
My NodeJS code looks like this:
client.db(database).admin().command({
setClusterParameter: { changeStreamOptions: { preAndPostImages: { expireAfterSeconds: 100 } } },
})
I'm running mongo in a replica set.