-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feature request: mongo change stream #2788
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
Comments
That's great request, @Lewik ! I think we need to consider to make it reactive like that sample you are pointing:
When an If it is not a The |
I've just implemented change stream messages to si queue channel. Want to share some conclusions:
Useful links: |
So, our channel adapter should go to the stop state with an appropriate application event emission without any possibility to restart. I think I don't care about container since reactive variant doesn't advertise it. Does it make sense to you? |
I agree except this:
INVALIDATE as result of dropping or renaming collection could be normal use case in nosql. Not a system or maintenance kind. |
OK. So, we may consider to "re-stream" with some fallback hook provided. We may consider it as an improvement when we already have a basic adapter implementation. |
@artembilan Thank you very much |
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
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
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
Please, see a PR on the matter: #3240 |
Mongo change stream is stream with changes from database. It's pushed from db side. It's not pulled by "us". So this source is very helpful to build live interfaces.
So SI inbound-change-stream-adapter will be great thing. I'd like to make this by myself, but I haven't enough knowledge to do this %).
https://docs.mongodb.com/manual/changeStreams/
https://github.com/spring-projects/spring-data-examples/tree/master/mongodb/change-streams (container sould be autostarted)
The text was updated successfully, but these errors were encountered: