阿帕奇骆驼:“直接:开始"端点 - 这是什么意思? [英] 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
https://camel.apache.org/components/latest/http-component.html
from("direct:start")
.to("http://myhost/mypath");
谢谢.
推荐答案
上面的direct:start"只是说路由以直接组件 命名为start".
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
.
这篇关于阿帕奇骆驼:“直接:开始"端点 - 这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!