'Spring Redis Does Not Delete the Stream Entries

I'm using the Redis Template and I want to delete the entries of the stream after processing it. I used the below code but it didn't delete from the Redis Streams.

redisTemplate.opsForStream().delete("my-stream-key",record.getId().getValue());


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source