Skip to content

Commit

Permalink
add route key header logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Oct 25, 2023
1 parent 317bd32 commit 0509dc7
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ public void configure() throws Exception {
.routeId("to-odh-ingress-route")
.choice()
.when(header("route_key").isNull())
.process(exchange -> WrapperProcessor.process(exchange, provider))
.process(e -> {
log.info("Message to provide {}", provider);
WrapperProcessor.process(e, provider);
})
.when(header("route_key").isNotNull())
.process(exchange -> WrapperProcessor.process(exchange, provider + "_" + header("route_key")))
.process(e -> {
log.info("Message with route_key {} to provide {}", header("route_key"), provider);
WrapperProcessor.process(e, provider);
})
// .to("file:bar?doneFileName=done")
.choice()
// forward to fastline
Expand Down

0 comments on commit 0509dc7

Please sign in to comment.