csredis icon indicating copy to clipboard operation
csredis copied to clipboard

stream XPending 报错:Unexpected response type: MultiBulk (expecting Bulk)

Open lang912 opened this issue 3 years ago • 4 comments

单元测试 入参如下:rds.XPending("testXReadGroupKey01", "testXReadGroup01","-","+",100); 报错代码: public void ExpectType(RedisMessage expectedType) { RedisMessage type = ReadType(); if ((int)type == -1) { var alldata = _io.ReadAll(); try { _io.Dispose(); } catch { } throw new EndOfStreamException($"Unexpected end of stream; expected type '{expectedType}'; data = '{Encoding.UTF8.GetString(alldata)}'"); } if (type != expectedType) throw new RedisProtocolException($"Unexpected response type: {type} (expecting {expectedType})"); }

lang912 avatar Jan 20 '22 07:01 lang912

换用 freeredis,新命令支持好一些

2881099 avatar Jan 20 '22 10:01 2881099

我也遇到了相同的问题,想问下csredis.core后面这个问题会修复吗?

            var streamsEntries = _redisClient.XPending(key,
                    consumerGroup,
                    start: "-",
                    end: "+",
                    count: _options.StreamEntriesCount,
                    consumer: consumerGroup);

Exception:

csreids 错误【localhost:6379/0】:Unexpected response type: MultiBulk (expecting Bulk)    at CSRedis.CSRedisClient.GetAndExecute[T](RedisClientPool pool, Func`2 handler, Int32 jump, Int32 errtimes)
   at CSRedis.CSRedisClient.ExecuteScalar[T](String key, Func`3 hander)
   at CSRedis.CSRedisClient.XPending(String key, String group, String start, String end, Int64 count, String consumer)

BenLocal avatar Feb 28 '22 13:02 BenLocal

freeredis的nuget包现在只支持到.net5,大概什么时候支持到.net6

BenLocal avatar Feb 28 '22 13:02 BenLocal

freeredis的nuget包现在只支持到.net5,大概什么时候支持到.net6

支持 netstandard 20 啊

2881099 avatar Mar 18 '22 11:03 2881099