Apache Camel:"direct:start";端点-这是什么意思? [英] Apache Camel : "direct:start" endpoint - what does it mean ?
问题描述
我是Apache Camel的新手.有人可以解释一下"direct:start"在骆驼中的含义. 请参阅
I'm new to Apache Camel. Can someone explain what "direct:start" means in Camel. Please see
from("direct:start")
.to("http://myhost/mypath");
谢谢.
推荐答案
The "direct:start" above is simply saying that the route starts with a Direct Component named "start".
直接端点提供路由的同步调用.如果要将Exchange
发送到direct:start端点,则可以创建ProducerTemplate
并使用各种发送方法.
The direct endpoint provides synchronous invocation of a route. If you want to send an Exchange
to the direct:start endpoint you would create a ProducerTemplate
and use the various send methods.
ProducerTemplate template = context.createProducerTemplate();
template.sendBody("direct:start", "This is a test message");
名称start
没什么特别的.它只是在引用终结点时要使用的名称,并且可能很容易被direct:foo
There is nothing special about the name start
. It is simply the name you are going to use when referring to the endpoint and could have just as easily been direct:foo
.
这篇关于Apache Camel:"direct:start";端点-这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!