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.此内容没有您所选择的语言版本。
A.11. Wire Tap
Overview 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The wire tap pattern, shown in Figure A.7, “Wire Tap Pattern”, allows you to route messages to a separate tap location before it is forwarded to the ultimate destination. The ServiceMix EIP wire tap pattern maps to the wire tap pattern in Apache Camel.
Figure A.7. Wire Tap Pattern
Example ServiceMix EIP route 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Example A.22, “ServiceMix EIP Wire Tap” shows how to define a wire tap using the ServiceMix EIP component. The In message from the source endpoint is copied to the In-listener endpoint, before being forwarded on to the target endpoint. If you want to monitor any returned Out messages or Fault messages from the target endpoint, you also must define an Out listener (using the
eip:outListner
element) and a Fault listener (using the eip:faultListener
element).
Example A.22. ServiceMix EIP Wire Tap
Equivalent Apache Camel XML route 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Example A.23, “Apache Camel Wire Tap Using XML” shows how to define an equivalent route using Apache Camel XML configuration.
Example A.23. Apache Camel Wire Tap Using XML
<route> <from uri="jbi:endpoint:http://progress.com/demos/test/wireTap/endpoint"/> <to uri="jbi:service:http://progress.com/demos/test/trace1"/> <to uri="jbi:service:http://progress.com/demos/test/target"/> </route>
<route>
<from uri="jbi:endpoint:http://progress.com/demos/test/wireTap/endpoint"/>
<to uri="jbi:service:http://progress.com/demos/test/trace1"/>
<to uri="jbi:service:http://progress.com/demos/test/target"/>
</route>
Equivalent Apache Camel Java DSL route 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Example A.24, “Apache Camel Wire Tap Using Java DSL” shows how to define an equivalent route using the Apache Camel Java DSL.
Example A.24. Apache Camel Wire Tap Using Java DSL
from("jbi:endpoint:http://progress.com/demos/test/wireTap/endpoint") .to("jbi:service:http://progress.com/demos/test/trace1", "jbi:service:http://progress.com/demos/test/target");
from("jbi:endpoint:http://progress.com/demos/test/wireTap/endpoint")
.to("jbi:service:http://progress.com/demos/test/trace1",
"jbi:service:http://progress.com/demos/test/target");