Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What happened with connectionClass? #934

Closed
dietkinnie opened this issue Aug 7, 2019 · 6 comments
Closed

What happened with connectionClass? #934

dietkinnie opened this issue Aug 7, 2019 · 6 comments
Labels

Comments

@dietkinnie
Copy link

Hello, I would like to make use of the new client and while checking https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/breaking-changes.html there are no mentions of changes to connectionClass, however it does not seem to be the case and I am unable to replicate the following:

const client = new Client({
  connectionClass: HttpAmazonESConnector,
  hosts: [process.env.ES_HOST],
  keepAlive: true,
});

Could you please advise how best to go around this or what I'm missing?

Cheers.

@delvedor
Copy link
Member

delvedor commented Aug 8, 2019

Hello! You are right, it's not mentioned in the document.
That parameter is now called Connection. You can find the documentation here.

Still, be aware that Connection classes written for the legacy client will not work with the new client. Since it looks like you are using the aws connection, take a look at TheDeveloper/http-aws-es#63 for more information.

@robertglenn
Copy link

It seems like this Connection class expects one to override a synchronous, non-void request method (per the aforementioned documentation), which doesn't seem to be compatible with any of the AWS methods (which either expect to be void, with a callback, or expose a promise).

A suggested solution was offered back in May, here, but it seems to A) leverage async/await (which I don't believe will work with this Connection class), and B) leverage an AWS.Signers namespace, which seems to be private, per this (and current experience).

@stale
Copy link

stale bot commented Aug 24, 2019

We understand that this might be important for you, but this issue has been automatically marked as stale because it has not had recent activity either from our end or yours.
It will be closed if no further activity occurs, please write a comment if you would like to keep this going.

Note: in the past months we have built a new client, that has just landed in master. If you want to open an issue or a pr for the legacy client, you should do that in https://github.com/elastic/elasticsearch-js-legacy

@stale stale bot added the stale label Aug 24, 2019
@stale stale bot closed this as completed Aug 31, 2019
@LeandroDG
Copy link

This is still very relevant to anyone using AWS ElasticSearch.

@paulvav
Copy link

paulvav commented Nov 27, 2019

Any work being done on this?

@lesyk-lesyk
Copy link

lesyk-lesyk commented Feb 25, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants