GH-195: Fix cafe-dsl for missed subscriber
Fixes https://github.com/spring-projects/spring-integration-samples/issues/195 After some Java DSL modification to request an explicit subscriber for replies into a main flow from the `route()`, the `cafe-dsl` has stopped to work * Remove redundant `defaultOutputToParentFlow()` since it doesn't bring any value into a flow logic * add `bridge()` into all the route sub-flows as a thirds subscriber to make an explicit reply into a main flow after delay and logging
This commit is contained in:
@@ -93,7 +93,8 @@ public class Application {
|
||||
" prepared cold drink #" +
|
||||
this.coldDrinkCounter.incrementAndGet() +
|
||||
" for order #" + p.getOrderNumber() + ": " + p)
|
||||
.handle(m -> System.out.println(m.getPayload())))))
|
||||
.handle(m -> System.out.println(m.getPayload()))))
|
||||
.bridge())
|
||||
.subFlowMapping(false, sf -> sf
|
||||
.channel(c -> c.queue(10))
|
||||
.publishSubscribeChannel(c -> c
|
||||
@@ -104,8 +105,8 @@ public class Application {
|
||||
" prepared hot drink #" +
|
||||
this.hotDrinkCounter.incrementAndGet() +
|
||||
" for order #" + p.getOrderNumber() + ": " + p)
|
||||
.handle(m -> System.out.println(m.getPayload())))))
|
||||
.defaultOutputToParentFlow())
|
||||
.handle(m -> System.out.println(m.getPayload()))))
|
||||
.bridge()))
|
||||
.<OrderItem, Drink>transform(orderItem ->
|
||||
new Drink(orderItem.getOrderNumber(),
|
||||
orderItem.getDrinkType(),
|
||||
|
||||
Reference in New Issue
Block a user