Skip to content

Add fluent API for ChangeStreams [DATAMONGO-2089] #2956

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

Closed
spring-projects-issues opened this issue Sep 18, 2018 · 1 comment
Closed

Add fluent API for ChangeStreams [DATAMONGO-2089] #2956

spring-projects-issues opened this issue Sep 18, 2018 · 1 comment
Assignees
Labels
in: core Issues in core support type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Christoph Strobl opened DATAMONGO-2089 and commented

instead of

Flux changeStream = reactiveTemplate
	.changeStream(newAggregation(match(where("operationType").is("insert"))),
				Person.class, ChangeStreamOptions.empty(), "person");

it would be nice to have a fluent alternative like

reactiveTemplate.listenToChanges() // entry point
  .in("person") // Optional Collection as String or Class
  .as(Jedi.class) // Optional domain type for mapping
  .where(newAggregation(match(where("operationType").is("insert"))) // optional filter query
  .resumeAt() // optional resume token or timestamp
  .stream(); // get the flux

Referenced from: pull request #751

@spring-projects-issues
Copy link
Author

Mark Paluch commented

Added a few comments to the PR

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 type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants