I’m getting the following error:
ServiceStack.Messaging.Redis.RedisMqServer: Exception in Redis MQ Server: Unknown reply on multi-request: 23
The code publishes 3000 messages and then in a handler it “sends” them. Right now it just returns., From my research the error is indicative of a race condition and using a shared client across threads, however I followed the guides and created a pooled client. I didn’t see this in my localhost testing but did on azure’s redis so not sure if that’s related or not. The code below is pretty much all of it:
var redisFactory = new PooledRedisClientManager("mypass@mycache.redis.cache.windows.net:6380?&ssl=True&abortConnect=False&SendTimeout=5000&ReceiveTimeout=5000");
container.Register<IMessageService>(x => new RedisMqServer(redisFactory, retryCount: 100));
Publish:
public void Any(SendCampaign campaign)
{
var range = Enumerable.Range(0, campaign.Count);
foreach (var r in range)
{
this.PublishMessage<QueueMessage>(new QueueMessage() { Id = r, BodyHtml = "test" });
}
}
Handler:
public void Post(QueueMessage m)
{
return;
}
Full error:
2017-09-18 17:38:02.450 +00:00 [Error] ServiceStack.Messaging.Redis.RedisMqServer: Exception in Redis MQ Server: Unknown reply on multi-request: 23���p3
ServiceStack.Redis.RedisResponseException: Unknown reply on multi-request: 23���p3
at ServiceStack.Redis.RedisNativeClient.ReadMultiData()
at ServiceStack.Redis.RedisNativeClient.SendReceive[T](Byte[][] cmdWithBinaryArgs, Func1 fn, Action
1 completePipelineFn, Boolean sendWithoutRead)
at ServiceStack.Redis.RedisNativeClient.SendExpectMultiData(Byte[][] cmdWithBinaryArgs)
at ServiceStack.Redis.RedisNativeClient.UnSubscribe(String[] fromChannels)
at ServiceStack.Redis.RedisSubscription.UnSubscribeFromAllChannels()
at ServiceStack.Redis.RedisSubscription.Dispose()
at ServiceStack.Redis.RedisPubSubServer.RunLoop()