0
我有一个骆驼Elasticsearch端点通过URI配置是这样的:如何迫使Camel Elasticsearch在测试中不启动本地节点?
.to("elasticsearch://clusterName?operation=INDEX&indexName=" + elasticIndex + "&indexType=" + elasticIndexType)
在测试中,我拦截此终结,而只是想确认我在这里发出的有效载荷,这样做:
elasticEndpoint = context.getEndpoint("mock:elastic", MockEndpoint.class);
interceptRoute = new AdviceWithRouteBuilder() {
@Override
public void configure() throws Exception {
interceptSendToEndpoint("elasticsearch:*")
.skipSendToOriginalEndpoint()
.to(elasticEndpoint);
}
};
但是,这总是会提示Camel启动本地嵌入的ElasticSearch,这反过来会在我的Jenkins服务器上创建一个我不想要的数据文件夹。
如何禁用自动创建本地Elasticsearch节点?