You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to Test Redis Cluster Using TestContaienrs.
I have used lettuce to test, which actually requires Manual NAT port mapping to resolve the SocketAddress.
I want to have similar support for jedis as well in Spring-Data-Redis.
Proposing Implementation
After going through the code I noticed this redis.clients.jedis.HostAndPortMapper class
which we could use in the org.springframework.data.redis.connection.jedis.JedisClientConfiguration.
We need to add this new contract in the JedisClientConfiguration
/**
* @return the optional {@link HostAndPortMapper}.
*/
Optional<HostAndPortMapper> getHostAndPortMapper();
This will be implemented by the default DefaultJedisClientConfigurationBuilder
Implementation
I have tried this change on my local and tested as well.
PR #2780 is the change I am proposing.
Hi,
I am trying to Test Redis Cluster Using TestContaienrs.
I have used
lettuce
to test, which actually requires Manual NAT port mapping to resolve the SocketAddress.Here is an example: RedisConfig.java
Requirement
I want to have similar support for jedis as well in Spring-Data-Redis.
Proposing Implementation
After going through the code I noticed this
redis.clients.jedis.HostAndPortMapper
classwhich we could use in the
org.springframework.data.redis.connection.jedis.JedisClientConfiguration
.We need to add this new contract in the
JedisClientConfiguration
This will be implemented by the default
DefaultJedisClientConfigurationBuilder
Implementation
I have tried this change on my local and tested as well.
PR #2780 is the change I am proposing.
Sample Example
A sample example of how to use it is added in this repo
Files to look for in this 👆 repo.
JedisClusterBasedIntegrationTest.java
RedisClusterTestContainer.java
JedisClusterTestContainer.java
NOTE:
Please suggest a better way to handle this in jedis if it already exist.
The text was updated successfully, but these errors were encountered: