Hi All
I have a use case where multiple visualization tools need to consumer the latest same stream topic message for multiple consumer group channel on Redis
Can you please let me how to consume latest messages from Redis topic using syncCommands.xreadgroup(consumer, streamOffset)
I am getting an exception of
Caused by: io.lettuce.core.RedisCommandExecutionException: ERR The $ ID is meaningless in the context of XREADGROUP: you want to read the history of this consumer by specifying a proper ID, or use the > ID to get new messages. The $ ID would just return an empty result set.
When I execute the following code below.
Here is my code
XReadArgs.StreamOffset streamOffset = XReadArgs.StreamOffset.latest(this.streamTopic);
List<StreamMessage<String, String>> messages = syncCommands.xreadgroup(consumer, streamOffset);
syncCommands.xgroupCreate(streamOffset, this.groupTopic, new XGroupCreateArgs());
List<StreamMessage<String, String>> messages = syncCommands.xreadgroup(consumer, streamOffset);
Thank you for your help
Regards, Bao