StackExchange.Redis icon indicating copy to clipboard operation
StackExchange.Redis copied to clipboard

StreamRead always return message info

Open ROMYIM opened this issue 4 years ago • 2 comments

I have executed db.StreamRead(ZikeyStream, position: StreamPosition.Beginning) many times. And it always return message info. It should return null because all messages have consumed. I executed the command xread streams Zikey 0-0 on redis-cli, it returns nil. Is this a bug?

ROMYIM avatar Oct 12 '21 09:10 ROMYIM

Can you please clarify what you're getting back there? If there are no entries, I expect the result to be an empty array, but I'm not sure what you mean by "message info". Are you getting an item in the array? Or something else?

NickCraver avatar Oct 21 '21 14:10 NickCraver

It returns some items when the parameter position is StreamPosition.Beginning, but it returns an empty array when the parameter is StreamPosition.NewMessages

ROMYIM avatar Oct 21 '21 14:10 ROMYIM