Reputation: 31
Started to use AWS DocumentDb change stream, want to keep Events written to a change stream for a database for 24 hours instead of default 3 hours. How I can do this. Standard AWS docs provide just this:
db.adminCommand({modifyChangeStreams: 1,
database: "",
collection: "",
enable: true
});
Upvotes: 1
Views: 750
Reputation: 5111
ekaterina@, you are correct, the docs for change streams are not clear and we will fix that. You can change the default retention period change_stream_log_retention_duration to 24 hours. Here are the docs on how to change cluster parameters, in general: https://docs.aws.amazon.com/documentdb/latest/developerguide/cluster_parameter_groups-parameters.html
Upvotes: 0
Reputation: 31
There is 'Parameter groups' on AWS Document Db console.
Choose your cluster group if created, if not use default.
There are several cluster parameters available, one of them: change_stream_log_retention_duration
, max value can be 86400
which is 24 hours in seconds.
Haven't had permissions to see that.
Hope it will help someone else.
Upvotes: 2