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節點?