Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 10. System Management
Abstract
The system management patterns describe how to monitor, test, and administer a messaging system.
10.1. Detour 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Detour 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The Detour from the Introducing Enterprise Integration Patterns allows you to send messages through additional steps if a control condition is met. It can be useful for turning on extra validation, testing, debugging code when needed.
Example 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
In this example we essentially have a route like
from("direct:start").to("mock:result")
with a conditional detour to the mock:detour
endpoint in the middle of the route..
from("direct:start").choice() .when().method("controlBean", "isDetour").to("mock:detour").end() .to("mock:result");
from("direct:start").choice()
.when().method("controlBean", "isDetour").to("mock:detour").end()
.to("mock:result");
Using the Spring XML Extensions
whether the detour is turned on or off is decided by the
ControlBean
. So, when the detour is on the message is routed to mock:detour
and then mock:result
. When the detour is off, the message is routed to mock:result
.
For full details, check the example source here: