Compatibility & prerequisites
Which Java, Spring Boot, and MongoDB versions are required?
Which Java, Spring Boot, and MongoDB versions are required?
Does FlowWarden work with a MongoDB standalone or a sharded cluster?
Does FlowWarden work with a MongoDB standalone or a sharded cluster?
--replSet rs0) is enough.Sharded clusters work with MongoDB Change Streams natively. FlowWarden’s SINGLE_LEADER mode uses a single distributed lock per stream, so it remains correct across shards.Can I use FlowWarden with Spring WebFlux / reactive code?
Can I use FlowWarden with Spring WebFlux / reactive code?
flowwarden.default-mode: REACTIVE in application.yml and write handlers that return Mono<Void>. The runtime uses ReactiveMongoTemplate and Project Reactor’s concatMap to preserve per-stream ordering.See Imperative vs Reactive for the decision criteria.Operations & scaling
What is the difference between SINGLE_LEADER and ALL_INSTANCES? Which one should I pick?
What is the difference between SINGLE_LEADER and ALL_INSTANCES? Which one should I pick?
ALL_INSTANCES(default) — every application instance processes every event. Use for cache invalidation, local read-models, and any handler whose effect is idempotent and local.SINGLE_LEADER— only one instance (the leader) processes events; others stand by. Use for non-idempotent side effects: billing, emails, payments, order processing.
| Aspect | ALL_INSTANCES | SINGLE_LEADER |
|---|---|---|
| Duplicates | Yes | No |
| Failover delay | None | ~20–80s |
| Idempotency required | Yes | No |
What happens if the leader instance crashes? Is there a risk of double processing?
What happens if the leader instance crashes? Is there a risk of double processing?
_fw_checkpoints. The guarantee is at-least-once: an event being processed at the moment of failover may be retried by the new leader, so your handler should remain idempotent for that window. Pair SINGLE_LEADER with @Checkpoint to make failover seamless.How many streams can a single instance handle? When should I scale horizontally?
How many streams can a single instance handle? When should I scale horizontally?
@ChangeStream in imperative mode, concatMap per stream in reactive mode). Multiple streams run in parallel on independent threads — the limit per instance is your handler throughput and your JVM resources, not a hard cap from FlowWarden.If a single stream’s sequential throughput becomes the bottleneck, the recommended pattern is to fan out to a message broker (Kafka, RabbitMQ) and parallelise on the consumer side. See Threading & Scaling for the full pattern with code samples.Is replaying from the DLQ idempotent? What if the event has already been processed?
Is replaying from the DLQ idempotent? What if the event has already been processed?
_id, the resume token, or a business key as a dedupe marker).The Core library is intentionally write-only for the DLQ — events accumulate in _fw_dlq with the original document, error, and stack trace. Reading and replaying DLQ entries is done from the Console. See Retry & DLQ for retry policies, exception filtering, and the DLQ document schema.Alternatives & positioning
Why use FlowWarden rather than Apache Flink (with the MongoDB CDC connector)?
Why use FlowWarden rather than Apache Flink (with the MongoDB CDC connector)?
What about Debezium / Kafka Connect?
What about Debezium / Kafka Connect?
How is this different from Spring Data MongoDB's native ChangeStream API?
How is this different from Spring Data MongoDB's native ChangeStream API?
ReactiveChangeStreamOperation provide the low-level API for opening a Change Stream and receiving events. Everything else — discovery, lifecycle, resilience, observability — is on you.FlowWarden adds a production-ready layer on top:- Declarative annotations:
@ChangeStream,@OnInsert/@OnUpdate/@OnDelete,@Pipeline,@Filter - Automatic resume token persistence via
@Checkpoint - Built-in retry policies and Dead Letter Queue (
@RetryPolicy,@DeadLetterQueue) - Multi-instance coordination with leader election (
SINGLE_LEADERmode) - Startup-time validation of handler signatures and configuration
- Console-side observability when paired with the Reporter