我是阿帕奇骆驼的新手。有人能解释一下Camel中“direct:start”的含义吗?
请参见
https://camel.apache.org/components/latest/http-component.html https://camel.apache.org/components/latest/http-component.html
from("direct:start")
.to("http://myhost/mypath");
Thanks.
上面的“direct:start”只是说路线以直接成分 http://camel.apache.org/direct.html命名为“开始”。
直接端点提供路由的同步调用。如果您想发送Exchange
到 direct:start 端点,您将创建一个ProducerTemplate
并使用各种发送方法。
ProducerTemplate template = context.createProducerTemplate();
template.sendBody("direct:start", "This is a test message");
这个名字没有什么特别的start
。它只是您在引用端点时要使用的名称,并且可以很容易地使用direct:foo
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)