Currently I am looking for ellegant solution to check that consumer groups in Redis stream already exist.
I have a few modules which connect to the same stream and read data from it. But they can start in different order and in case consumer groups is not created - try to create it. In case first module have created group, others get an error according to documentation.
From the documentation:
If the specified consumer group already exists, the command returns a -BUSYGROUP error.
I would like to avoid this error.
I use Jedis client for work with Redis.
I know there is XINFO
command (which can returns groups list), but it doesn't work when Redis was started in cluster mode (which can be one of my configuration).