I have a rather primitive use-case for streams: multiple producers and 1 consumer that periodically process messages in batches. Sometimes there will be more than 1 consumer and this is why I want to switch from "traditional" unreliable queue (rpush/lrange/ltrim) to streams.
There're actually 2 related questions:
When using Redis consumer groups I have to specify group name and consumer name. Is this good idea to use some hard-coded string as group's name and some random string as consumer name? Consumer is just 1 process and its name will be different on each start in this case. On some rare occasions there will be 2 or more consumers at a time.
Consumer group has to be created via
xgroup create
before I canxreadgroup
from it. Each time a new consumer starts (with a random name) it gets added to a list of consumers, but it remains there even after the process died. My understanding that in this case I need to re-assign all pending messages from the dead consumers to the active one, and then delete old consumers. Is this correct?