Spring Redis and Yugabyte Jedis library Database type mismatch

I need help with spring redis library and Yugabyte Jedis library
The spring documentation points to database as type integer
https://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/connection/RedisStandaloneConfiguration.html#setDatabase-int-

The JedisPool has database as a type string.

https://jar-download.com/artifacts/com.yugabyte/jedis/2.9.0-yb-16/documentation
Can you help on how to proceed using spring redis with yugabyte yedis library ?

Hi Sujan,
If you want to use an integer as the database id it should work fine.

YB supports String ids, in addition to integer ids – so people can name their databases more meaningfully. However, it looks like Spring doesn’t support that version. So, you’d have to use an integer id for your database and that should work fine.

One thing to note though – is that YB requires you to explicitly create the database that you are planning to use, before you start using it. You can follow how to create a DB here: https://docs.yugabyte.com/latest/yedis/api/createdb/

Hi @Sujan_Deshpande,

We you able to get the issue resolved? Please feel free to reach out if you need anything else.