Turn REDIS .outq and .dlq off

I think this is a question that should be asked of REDIS, but I have been thus far unable to find a solution for this.

Is there a way to suppress the .outq and .dlq queues from writing to REDIS ?

We have an environment with low resources and this would make things easier to manage.

Set DisablePublishingResponses and DisablePublishingToOutq when registering RedisMqServer

If you use Request/Reply pattern it will avoid publishing errors to the response queue otherwise it will be published to the .dlq.

1 Like

Beautiful thank you.

Also, is there a way to determine number of items in a queue ?

They’re just plain Redis lists, so you can just perform a list count on the queue.

If you have #Script SharpPagesFeature registered you can mix in feature-mq which provides a UI with some more insight.

Otherwise you can fetch stats about MQ Server from IMessageService.GetStatsDescription()

Thanks Mythz. The StatsDescription is helpful but appears to only return totals. I am keen for current counts.

I am looking to access the counts in code at the time I enqueue a message into the queue using the mqClient class.

Something along the lines of

if (queue.Count < 1000){

Is here a servicestack wrapper class that would provide that metric ?

There’s no standard way to retrieve the current MQ count.

For the current count in Redis MQ you would need to get the list count of the backing Redis Queue.

For normal MQ’s you can get the Redis MQ List name from QueueNames<T>.In which you should be able to use with GetListCount() using ServiceStack’s IRedisClient or the Redis LLEN command with any other redis client.

Will give this a go, thank you

It works thank you. I have a solution.

1 Like