Is possible to create empty stream using spring redis data? Am trying to create rest endpoint to create just stream without data.
Thanks,
Is possible to create empty stream using spring redis data? Am trying to create rest endpoint to create just stream without data.
Thanks,
You can use the
XGROUP CREATE
command withMKSTREAM
option, to create an empty stream:If you don't need the group, you can destroy it manually:
Another solution is to create a stream with
XADD
command, and then useXDEL key id
to remove the newly created entry. In this case, the stream will be kept.