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

Commit 2e693cf

Browse files
committed
Add PublishResponsesWhitelist and DisablePublishingResponses to RedisMqServer
1 parent 425c88e commit 2e693cf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/ServiceStack.Redis/Messaging/RedisMqServer.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ public IMessageQueueClient CreateMessageQueueClient()
8181
return new RedisMessageQueueClient(this.clientsManager, null);
8282
}
8383

84+
/// <summary>
85+
/// Opt-in to only publish responses on this white list.
86+
/// Publishes all responses by default.
87+
/// </summary>
88+
public string[] PublishResponsesWhitelist { get; set; }
89+
90+
public bool DisablePublishingResponses
91+
{
92+
set { PublishResponsesWhitelist = value ? new string[0] : null; }
93+
}
94+
8495
//Stats
8596
private long timesStarted = 0;
8697
private long noOfErrors = 0;
@@ -153,6 +164,7 @@ protected IMessageHandlerFactory CreateMessageHandlerFactory<T>(Func<IMessage<T>
153164
return new MessageHandlerFactory<T>(this, processMessageFn, processExceptionEx) {
154165
RequestFilter = this.RequestFilter,
155166
ResponseFilter = this.ResponseFilter,
167+
PublishResponsesWhitelist = PublishResponsesWhitelist,
156168
RetryCount = RetryCount,
157169
};
158170
}

0 commit comments

Comments
 (0)