ElasticsearchComponent elasticsearchComponent = new ElasticsearchComponent();
elasticsearchComponent.setHostAddresses("myelkhost:9200");
camelContext.addComponent("elasticsearch-rest", elasticsearchComponent);
ElasticsearchComponent elasticsearchComponent = new ElasticsearchComponent();
elasticsearchComponent.setHostAddresses("myelkhost:9200");
camelContext.addComponent("elasticsearch-rest", elasticsearchComponent);
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
elasticsearch를 사용한 기본 인증 또는 elasticsearch 클러스터 앞에 있는 역방향 http 프록시를 사용하는 경우 아래 예제와 같은 구성 요소에서 기본 인증 및 SSL을 설정하기만 하면 됩니다.
ElasticsearchComponent elasticsearchComponent = new ElasticsearchComponent();
elasticsearchComponent.setHostAddresses("myelkhost:9200");
elasticsearchComponent.setUser("elkuser");
elasticsearchComponent.setPassword("secure!!");
elasticsearchComponent.setEnableSSL(true);
camelContext.addComponent("elasticsearch-rest", elasticsearchComponent);
ElasticsearchComponent elasticsearchComponent = new ElasticsearchComponent();
elasticsearchComponent.setHostAddresses("myelkhost:9200");
elasticsearchComponent.setUser("elkuser");
elasticsearchComponent.setPassword("secure!!");
elasticsearchComponent.setEnableSSL(true);
camelContext.addComponent("elasticsearch-rest", elasticsearchComponent);
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow