Spring MVC or Spring WebFlux — both are supported.
MongoDB Replica Set
Change Streams require a Replica Set. A single-node RS is fine for local dev.
MongoDB must be running as a Replica Set — Change Streams are not available on standalone instances. For local development, start MongoDB with --replSet rs0 or use a Docker Compose setup.
If you also pull flowwarden-stream-core-testkit (for backend implementors) or future satellite modules, import the flowwarden-bom in your dependencyManagement to keep versions aligned:
Add @EnableFlowWarden to your main application class:
import io.flowwarden.stream.annotation.EnableFlowWarden;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication@EnableFlowWardenpublic class MyApplication { public static void main(String[] args) { SpringApplication.run(MyApplication.class, args); }}
This activates the FlowWarden auto-configuration. @ChangeStream classes are discovered through Spring’s standard component scanning — @ChangeStream is meta-annotated with @Component, so no extra @ComponentScan configuration is needed.
When documentType is set, FlowWarden infers the collection name from the @Document annotation (or the decapitalized class name if none). No need to repeat it in @ChangeStream(collection = "orders").