Trendyol / go-dcp-elasticsearch

The Go implementation of the Couchbase to Elasticsearch with DCP.
MIT License
75 stars 18 forks source link

Expose DiscoverNodesOnStart and DiscoverNodesInterval #38

Open mhmtszr opened 1 year ago

mhmtszr commented 1 year ago

If we set less node urls than existing, our request will be always forwarded to these nodes. We want to use other nodes too.

We need to configure DiscoverNodesOnStart and DiscoverNodesInterval configs, we just need to add these configs to elasticsearch.NewClient function.

oguzhaneren commented 1 year ago

You may consider exposing all internal elastic client configurations to go-dcp-elasticsearch clients.

it will be good if I can overwrite any parameters here:

https://github.com/Trendyol/go-dcp-elasticsearch/blob/master/elasticsearch/client/client.go#L11

bilalislam commented 1 year ago

btw , if I set one url or lb for DiscoverNodesOnStart then I got error like dialing to the given TCP address timed out.

its fixed when set to true in config.yml Because it was configured as DiscoverNodesOnStart: !config.Elasticsearch.DisableDiscoverNodesOnStart

Keep in mind that 💯