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

how to set jedis blockingSocketTimeoutMillis? #2738

Open
yunduankaifa opened this issue Oct 16, 2023 · 3 comments
Open

how to set jedis blockingSocketTimeoutMillis? #2738

yunduankaifa opened this issue Oct 16, 2023 · 3 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@yunduankaifa
Copy link

yunduankaifa commented Oct 16, 2023

in our project, we need to use lua script, but the default timeoutmillis is 0, which means to block forever; image
Question : how to set blockingSocketTimeoutMillis in spring-data-redis?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 16, 2023
@mp911de
Copy link
Member

mp911de commented Oct 16, 2023

There's no mechanism to alter DefaultJedisClientConfig (implementing JedisClientConfig).

JedisClientConfig carries a lot of per-connection details such as the database or authentication credentials that conflict with Spring Data Redis' RedisConfiguration types that define authentication and database details.

Out of curiosity, why don't you use the Lettuce driver that has a configuration of TimeoutSource to supply timeouts on a per-command basis where you could define a timeout specific to your Lua command?

@yunduankaifa
Copy link
Author

There's no mechanism to alter DefaultJedisClientConfig (implementing JedisClientConfig).

JedisClientConfig carries a lot of per-connection details such as the database or authentication credentials that conflict with Spring Data Redis' RedisConfiguration types that define authentication and database details.

Out of curiosity, why don't you use the Lettuce driver that has a configuration of TimeoutSource to supply timeouts on a per-command basis where you could define a timeout specific to your Lua command?

since the issue (redis/lettuce#2082) of lettuce has not been well solved, to be on the safe side, we choose jedis

@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 6, 2023
@mp911de mp911de self-assigned this Nov 6, 2023
@tjuchniewicz
Copy link

Mechanism to customize JedisClientConfig is also required to provide custom credentialsProvider required for implementing cloud identity based authentication.

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

No branches or pull requests

4 participants