Add order-fulfillment module: Spring Modulith 2.1 boundary enforcement, events, generated docs
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
$ mvn -pl order-fulfillment -am test
|
||||
|
||||
2026-10-03T23:50:25.993+05:30 INFO 1737 --- [order-fulfillment] [ task-2] c.a.m.n.NotificationManagement : Order 1 received for 3x WIDGET-1
|
||||
2026-10-03T23:50:26.062+05:30 INFO 1737 --- [order-fulfillment] [ task-4] c.a.m.n.NotificationManagement : Order 1 is on its way (WIDGET-1)
|
||||
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.888 s -- in com.ankurm.modulithdemo.order.OrderFulfillmentIntegrationTests
|
||||
[INFO] Running com.ankurm.modulithdemo.ModularityTests
|
||||
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.437 s -- in com.ankurm.modulithdemo.ModularityTests
|
||||
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
|
||||
[INFO] BUILD SUCCESS
|
||||
|
||||
All three modules fired in sequence from a single published OrderPlaced, on two
|
||||
different async listener threads (task-2, task-4 - each @ApplicationModuleListener
|
||||
runs on its own thread from the pool, which is why ordering between independent
|
||||
listeners on the SAME event is not guaranteed, only causal ordering between an event
|
||||
and what it triggers):
|
||||
|
||||
order -> inventory (reserve stock, publish StockReserved)
|
||||
-> shipping (schedule shipment, publish ShipmentScheduled)
|
||||
-> notification (fires twice: once reacting to OrderPlaced, once to ShipmentScheduled)
|
||||
Reference in New Issue
Block a user