このコンテンツは選択した言語では利用できません。

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

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

<eip:wire-tap service="test:wireTap" endpoint="endpoint">
  <eip:target>
    <eip:exchange-target service="test:target" />
  </eip:target>
  <eip:inListener>
    <eip:exchange-target service="test:trace1" />
  </eip:inListener>
</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>

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");
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.