ElasticsearchComponent elasticsearchComponent = new ElasticsearchComponent();
elasticsearchComponent.setHostAddresses("myelkhost:9200");
camelContext.addComponent("elasticsearch", elasticsearchComponent);
ElasticsearchComponent elasticsearchComponent = new ElasticsearchComponent();
elasticsearchComponent.setHostAddresses("myelkhost:9200");
camelContext.addComponent("elasticsearch", 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);
elasticsearchComponent.setCertificatePath(certPath);
camelContext.addComponent("elasticsearch", elasticsearchComponent);
ElasticsearchComponent elasticsearchComponent = new ElasticsearchComponent();
elasticsearchComponent.setHostAddresses("myelkhost:9200");
elasticsearchComponent.setUser("elkuser");
elasticsearchComponent.setPassword("secure!!");
elasticsearchComponent.setEnableSSL(true);
elasticsearchComponent.setCertificatePath(certPath);
camelContext.addComponent("elasticsearch", elasticsearchComponent);
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow