= Direct Component
:doctitle: Direct
:shortname: direct
:artifactid: camel-direct
:description: Call another endpoint from the same Camel Context synchronously.
:since: 1.0
:supportlevel: Stable
:tabs-sync-option:
:component-header: Both producer and consumer are supported
:core:
//Manually maintained attributes
:camel-spring-boot-name: direct

*Since Camel {since}*

*{component-header}*

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.

[TIP]
====
*Asynchronous*

The xref:seda-component.adoc[SEDA] component provides asynchronous invocation of
any consumers when a producer sends a message exchange.
====

== URI format

----
direct:someId[?options]
----

Where _someId_ can be any string to uniquely identify the endpoint.


// component-configure options: START

// component-configure options: END

// component options: START
include::partial$component-configure-options.adoc[]
include::partial$component-endpoint-options.adoc[]
// component options: END

// endpoint options: START

// endpoint options: END


== Examples

In the route below, we use the direct component to link the two routes together:

[tabs]
====
Java::
+
[source,java]
----
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");
----

Spring XML::
+
[source,xml]
----
<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>
----

====

See also samples from the xref:seda-component.adoc[SEDA] component, how they can be used together.



include::spring-boot:partial$starter.adoc[]
