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

Chapter 22. Direct


Direct Component

The direct: component provides direct, synchronous invocation of any consumers when a producer sends a message exchange. This endpoint can be used to connect existing routes in the same camel context.
Note
The Seda component provides asynchronous invocation of any consumers when a producer sends a message exchange.
Note
The VM component provides connections between Camel contexts as long they run in the same JVM.

URI format

direct:someName[?options]
Copy to Clipboard Toggle word wrap
Where someName can be any string to uniquely identify the endpoint

Options

Expand
Name Default Value Description
You can append query options to the URI in the following format, ?option=value&option=value&...

Samples

In the route below we use the direct component to link the two routes together:
from("activemq:queue:order.in").to("bean:orderServer?method=validate").to("direct:processOrder");

from("direct:processOrder").to("bean:orderService?method=process").to("activemq:queue:order.out");
Copy to Clipboard Toggle word wrap
And the sample using spring DSL:
   <route>
     <from uri="activemq:queue:order.in"/>
     <to uri="bean:orderService?method=validate"/>
     <to uri="direct:processOrder"/>
  </route>

  <route>
     <from uri="direct:processOrder"/>
     <to uri="bean:orderService?method=process"/>
     <to uri="activemq:queue:order.out"/>
  </route>
Copy to Clipboard Toggle word wrap
See also samples from the SEDA component, how they can be used together.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2025 Red Hat