这部分难题是我的噩梦,我在 2 个不同的 tomcat 实例上部署了 ServiceMix 和 2 个 Java 应用程序:
第一个应用程序:
http://localhost:8080/textmsgClient
第二个应用程序:
http://localhost:8181/textmsgServer
现在我的两个应用程序需要通信,尽管我希望通过 ServiceMix 进行通信,所以我可以做一些日志和所有事情。
我已经在./deploy
目录中创建了一个蓝图 XML 文件,但我应该在其中放置哪些路由?
我不能这样做:
<route>
<from uri="http://localhost:8080/textmsgClient"/>
<log message="Test log"/>
<to uri="http://localhost:8181/textmsgServer"/>
</route>
那么正确的做法是什么?
顺便说一句,我的 XML 文件如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="file:camel/input"/>
<log message="Moving ${file:name} to the output directory"/>
<to uri="file:camel/output"/>
</route>
</camelContext>
</blueprint>