Two questions about redis stream
jeven2016 opened this issue · comments
Jeven commented
Hi, developer,
So glad the redis stream is supported right now and I appreciate your effort very much.
This morning I read your code and try to figure out how to refactor my code, but I'm still confused about the following questions.
Could you can take a look when you are free?
- why no ack message sent after the message is transferred into the internal chan?
- how to avoid the messages in the internal chan of Source/Sink being discarded? Say the internal chan of RedisSource/RedisSink still has many messages that hadn't been consumed, but the program unfortunately needs to exit , how to handle such scenario?
Thanks again
Eugene R. commented
The NewStreamSource
constructor has a *redis.XReadGroupArgs
parameter. It contains the NoAck
field that specifies the NOACK subcommand of the Redis XREADGROUP command. Set this value to true to add a NOACK argument and acknowledge messages later in the pipeline using redisClient.XAck
.