com.byeolnaerim:reactive-mongo-dsl
Utilizes the features of the MongoDB Reactive Streams Driver while connecting dynamic queries, aggregation, lookup, atomic updates, bulk, Atlas Search, and Vector Search into a consistent DSL based on Reactor.
Reactive Mongo DSL 1.0.0
reactive-mongo-dsl is a Java library that connects dynamic conditions, queries, paging, aggregation, $lookup, grouping, atomic updates, bulk, Atlas Search, and Vector Search into a single chaining flow on top of the MongoDB Reactive Streams Driver and Project Reactor.
Driver-first
Does not replace the MongoDB Java Driver. The typed builder provided by the Driver is still utilized, while the DSL simplifies repetitive combinations and Reactor connections.
Framework-independent core
The core does not directly depend on Spring Data MongoDB. The base DriverMongoExecutionContext directly uses the Reactive Streams Driver.
Escape hatch
Allows direct access to Bson, SearchOperator, VectorSearchQuery, and Driver option customizers, so even if new features are added to the Driver, they can be used within the existing DSL flow.
Based on version 1.0.0
Artifact
com.byeolnaerim:reactive-mongo-dsl:1.0.0
Java
21+
MongoDB Java Driver
Based on version 5.10.0
Reactor
Based on Reactor BOM 2025.0.7
Spring Data MongoDB
Optional. In Spring projects, it connects existing mapping/auditing settings as an application-side adapter.
build.gradle
textMain execution flow
Standard Query
executeEntity(...) -> fields(...) -> end() -> find/findAll/count/distinct/delete/exists/atomicUpdate
Driver-native Aggregation.
Directly constructs the Driver pipeline from the first stage using executeEntity(...).aggregation().stage(Bson)....
Atlas Search
Configures the $search specific operator and terminal in executeEntity(...).search(index).
Vector Search
Configures the query vector, ANN/ENN, filter, and nested vector option in executeEntity(...).vectorSearch(index).
Transaction
getTxJob(...) propagates the MongoDB ClientSession to the Reactor Context.