Skip to content

Conversation

slukes
Copy link

@slukes slukes commented Jun 10, 2025

When working with elasticache with IAM (and probably other providers), it is necessary to use a token that is only valid for 15 minutes as a password, as a result subsequent reconnects need to be done with a newly generated password.

There are at least these two issues discussing this:

#1738
#1810

Up until now we had been using an on('ready,...) event listener to manage this in our code, but since migrating from bull to bullmq which uses duplicate method which does not copy the event listeners and what is more applies it's own on ready listener which makes this option unusable.

Rather than continuing with the (quite hacky) work around suggested in the above two issues, I would like to propose that we accept a function instead of a string for the password.

@artman
Copy link

artman commented Jun 26, 2025

Yes please.

@slukes
Copy link
Author

slukes commented Jun 30, 2025

Hello 👋 any chance of a review please

@MykhailoMatiiasevych
Copy link

Please review the pr, the feature is very needed

@MykhailoMatiiasevych
Copy link

Would this work properly in case of reconnects?
I was thinking to bring password resolution closer to AUTH, ie in connectHandler

@PavelPashov
Copy link
Contributor

At first glance this looks okay, however the checks are failing

@slukes please make sure the tests pass and then request a review again

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

Successfully merging this pull request may close these issues.

4 participants