Skip to content

GH-2788: Add MongoDbChangeStreamMessageProducer #3240

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

Conversation

artembilan
Copy link
Member

Fixes #2788

  • Introduce a MessageProducerSupport.subscribeToPublisher(Publisher<Message<?>>)
    for components which produces Flux for data from their source
  • Such a component is auto-stopped when subscription to that Publisher is canceled
  • Implement a MongoDbChangeStreamMessageProducer based on the reactive support for
    in Spring Data MongoDb
  • Implement a Java DSL for MongoDbChangeStreamMessageProducer
  • Disable a test for change stream since it requires server of version 4.x started with 'replSet' option
  • Add MongoHeaders for change stream events

Fixes spring-projects#2788

* Introduce a `MessageProducerSupport.subscribeToPublisher(Publisher<Message<?>>)`
for components which produces `Flux` for data from their source
* Such a component is auto-stopped when subscription to that `Publisher` is canceled
* Implement a `MongoDbChangeStreamMessageProducer` based on the reactive support for
in Spring Data MongoDb
* Implement a Java DSL for `MongoDbChangeStreamMessageProducer`
* Disable a test for change stream since it requires server of version 4.x started with 'replSet' option
* Add `MongoHeaders` for change stream events
@artembilan
Copy link
Member Author

TODO: Docs.

Probably some rework after consultation with Reactor team...

…Running())`

instead of storing a `subscription` from a callback
* Document new features
@artembilan
Copy link
Member Author

Pushed the fix for auto-completion of producing via .takeWhile((message) -> isRunning()) after consulting with Reactor team.
Documented new features.

@artembilan artembilan requested a review from garyrussell April 6, 2020 17:54
@garyrussell
Copy link
Contributor

Rebased and merged as d8c378b with minor doc polishing.

@garyrussell garyrussell closed this Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: mongo change stream
2 participants