我有一个用 Java 编写的简单路由,并将 jar 文件部署到 activemq/lib 并更新了 activeMQ.xml 以通过 package can 元素查找路由。
但是该路线未显示在 Web 管理控制台中...想知道还涉及哪些其他步骤...
public class SampleConnectorRoute extends RouteBuilder {
public void configure() {
from("file://c:/app/mdt/dropbox/new").to("file://c:/app/mdt/dropbox/processed");
}
public static void main(String[] args) throws Exception {
SampleConnectorRoute builder = new SampleConnectorRoute();
builder.runSampleConnectorRoute();
}
public void runSampleConnectorRoute() throws Exception {
// create CamelContext
CamelContext camelContext = new DefaultCamelContext();
camelContext.addRoutes(this);
camelContext.start();
System.out.println("Context Started");
}
}
然后我在 activemq/conf/activemq.xml http://activemq.apache.org/camel/schema/spring"> com.apps.mdt.routes 下有以下配置