public class ActorRouteDefinition<T extends org.apache.camel.model.ProcessorDefinition<T>>
extends java.lang.Object
ProcessorDefinition
.
There is an implicit conversion in the akka.camel
package object that converts a ProcessorDefinition
into this
type.
Because of this conversion, it is possible to use an ActorRef
as a to
parameter in building a route:
class TestRoute(system: ActorSystem) extends RouteBuilder {
val responder = system.actorOf(Props[TestResponder], name = "TestResponder")
def configure {
from("direct:producer").to(responder)
}
}
param: definition the processor definitionConstructor and Description |
---|
ActorRouteDefinition(org.apache.camel.model.ProcessorDefinition<T> definition) |
Modifier and Type | Method and Description |
---|---|
T |
to(ActorRef actorRef)
Sends the message to an ActorRef endpoint.
|
T |
to(ActorRef actorRef,
boolean autoAck,
scala.concurrent.duration.Duration replyTimeout)
Sends the message to an ActorRef endpoint
|
public ActorRouteDefinition(org.apache.camel.model.ProcessorDefinition<T> definition)
public T to(ActorRef actorRef)
actorRef
- the actorRef to the actor.public T to(ActorRef actorRef, boolean autoAck, scala.concurrent.duration.Duration replyTimeout)
actorRef
- the consumerautoAck
- Determines whether one-way communications between an endpoint and this consumer actor
should be auto-acknowledged or application-acknowledged.
This flag has only effect when exchange is in-only.replyTimeout
- When endpoint is out-capable (can produce responses) replyTimeout is the maximum time
the endpoint can take to send the response before the message exchange fails. It defaults to 1 minute.
This setting is used for out-capable, in-only, manually acknowledged communication.