Skip to content

Make ChangeStreamOptionsBuilder support startAtOperationTime [DATAMONGO-2607] #3460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
spring-projects-issues opened this issue Aug 10, 2020 · 6 comments
Assignees
Labels
in: core Issues in core support status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Johan Haleby opened DATAMONGO-2607 and commented

Newer versions of the MongoDB java driver (and server) supports "startAtOperationTime" for change streams (https://docs.mongodb.com/manual/changeStreams/) to be able to resume a change stream even after an "invalidate" event. But the ChangeStreamOptionsBuilder currently only allows specifying "resumeAt" and not "startAtOperationTime" which prohibits this use case. In the application I'm developing this is really important but I cannot find a workaround when using Spring Data MongoDB. 

It would be great if this could be supported by Spring Data MongoDB as well


Affects: 3.1 M1 (2020.0.0), 3.0.2 (Neumann SR2)

Reference URL: https://stackoverflow.com/questions/55184492/difference-between-resumeafter-and-startatoperationtime-in-mongodb-change-stream

@johanhaleby
Copy link

Anything I can do to help?

@christophstrobl
Copy link
Member

@johanhaleby If you have some time, a PR would be welcome :)

@christophstrobl christophstrobl added the status: ideal-for-contribution An issue that a contributor can help us with label Feb 5, 2021
@tudormarc
Copy link

tudormarc commented May 25, 2022

@christophstrobl can I make a PR for it? Asking because nothing happened to it from Feb 2021

@christophstrobl
Copy link
Member

@tudormarc a PR would be welcome :)

tudormarc added a commit to tudormarc/spring-data-mongodb that referenced this issue May 31, 2022
tudormarc added a commit to tudormarc/spring-data-mongodb that referenced this issue May 31, 2022
@tudormarc
Copy link

@christophstrobl PR submitted :)

@mp911de
Copy link
Member

mp911de commented Jun 27, 2022

After having a look, we already support setting startAtOperationTime via ChangeStreamOptions.resumeAt(…). Depending on the presence of a resume token, we either set resumeAfter or startAfter. I'm wondering what's missing as we already set all of these options and the pull request #4071 isn't setting any of the mentioned options on the Mongo ChangeStreamIterable or ChangeStreamPublisher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants