Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 283ded8

Browse files
committed
Change RedisMqServer OnlyEnablePriortyQueuesForTypes to PriortyQueuesWhitelist that's configurable with strings
1 parent 8c9716a commit 283ded8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ServiceStack.Redis/Messaging/RedisMqServer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class RedisMqServer : IMessageService
6161
/// <summary>
6262
/// If you only want to enable priority queue handlers (and threads) for specific msg types
6363
/// </summary>
64-
public Type[] OnlyEnablePriortyQueuesForTypes { get; set; }
64+
public string[] PriortyQueuesWhitelist { get; set; }
6565

6666
/// <summary>
6767
/// Don't listen on any Priority Queues
@@ -70,7 +70,7 @@ public bool DisableAllPriorityQueues
7070
{
7171
set
7272
{
73-
OnlyEnablePriortyQueuesForTypes = new Type[0];
73+
PriortyQueuesWhitelist = new string[0];
7474
}
7575
}
7676

@@ -187,8 +187,8 @@ public void Init()
187187
var queueNames = new QueueNames(msgType);
188188
var noOfThreads = handlerThreadCountMap[msgType];
189189

190-
if (OnlyEnablePriortyQueuesForTypes == null
191-
|| OnlyEnablePriortyQueuesForTypes.Any(x => x == msgType))
190+
if (PriortyQueuesWhitelist == null
191+
|| PriortyQueuesWhitelist.Any(x => x == msgType.Name))
192192
{
193193
noOfThreads.Times(i =>
194194
workerBuilder.Add(new MessageHandlerWorker(

0 commit comments

Comments
 (0)