-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Is there a recommended solution on how to enable mongoDB "change streams" ? #497
Comments
Setting |
@XSpielinbox you are right, if you use the spring integration: https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.spring/blob/041421695626591599798602a39df8a61e3fdb42/src/main/java/de/flapdoodle/embed/mongo/spring/autoconfigure/AbstractServerFactory.java#L84 maybe it is time for an backport:) |
If its already in the spring3.1.x branch of https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.spring/ , which I use anyhow, it would be nice, if there would be an explationaion in the HowTo.md how to use this autoconfigure/AbstractServerFactory, because it is not clear to me. |
@bodote yes.. the setting is all you need, as everything else will be configured from that (using AbstractServerFactory etc). |
I see, thank you. |
@bodote hmmm.. i may fix this with the next mayor release.. i think it was 'spring.mongodb.embedded' .. and i changed it to 'de.flapdoodle.mongodb.embedded' .. |
moved it to an new issue.. so i close this. |
Discussed in #496
Originally posted by bodote November 15, 2023
MongoDB has a feature called "change streams". However, this feature is only available if there is a "replica set". The replica set in turn is NOT enabled by default for single instance MongoDBs. You can enable the replica set with de.flapdoodle.embed.mongo. But it seemes a little bit cumbersome though.
Is there any recommendation on how to use this with de.flapdoodle.embed.mongo ?
what we do is this:
plus :
immediately
@BeforeEach
test.especially the need for this admin - command above turned out to be somehow problematic and lead to unstable test until we wraped it part of the test code in some
await().atMost(10, SECONDS).until(() -> {...}
Is there any better way ?
The text was updated successfully, but these errors were encountered: