You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+30-11
Original file line number
Diff line number
Diff line change
@@ -17,15 +17,15 @@ This is inspired from the [Rabbit MQ implementation](http://docs.servicestack.ne
17
17
- OneWay MQ and HTTP Service Clients are Substitutable
18
18
19
19
20
-
>>ServiceStack has added MQ support for Azure Service Bus as part of their v4.5.14 release maintained >> at https://github.com/ServiceStack/ServiceStack.Azure.
21
-
>>
22
-
>>I would recommend using the official implementation instead of this one if it covers your needs.
23
-
>>
24
-
>>One reason you may want to give this non-official implementation a try is that you are not targeting
25
-
>>.NET Core and you need some feature that is not part of the official MQ Server.
26
-
>>
27
-
>>Ideally, the official package eventually offers all features (and likely more) and this repository can enjoy
28
-
>>an early retirement.
20
+
> ServiceStack has added MQ support for Azure Service Bus as part of their v4.5.14 release maintained at https://github.com/ServiceStack/ServiceStack.Azure.
21
+
>
22
+
> I would recommend using the official implementation instead of this one if it covers your needs.
23
+
>
24
+
> One reason you may want to give this non-official implementation a try is that you are not targeting
25
+
> .NET Core and you need some feature that is not part of the official MQ Server.
26
+
>
27
+
> Ideally, the official package eventually offers all features (and likely more) and this repository can enjoy
28
+
> an early retirement.
29
29
30
30
## Adding Azure Service Bus MQ support to ServiceStack
31
31
@@ -64,6 +64,10 @@ The [AzureBusServer](src\ServiceStack.AzureServiceBus\AzureBusServer.cs) has the
64
64
-`Action<QueueDescription>`**CreateQueueFilter** - A filter to customize the options Azure Queues are created/updated with.
65
65
-`Action<string, BrokeredMessage>`**GetMessageFilter** - Called every time a message is received.
66
66
-`Action<string, BrokeredMessage, IMessage>`**PublishMessageFilter** - Called every time a message gets published.
67
+
-`string[]`**PriorityQueuesWhitelist** - If you only want to enable priority queue handlers (and threads) for specific message types. All message types have priority queues by default.
68
+
-`bool`**DisablePriorityQueues** - No priority queue will be created or listened to.
69
+
-`string[]`**PublishResponsesWhitelist** - Opt-in to only publish responses on this whitelist. All responses are published by default.
70
+
-`bool`**DisablePublishingResponses** - No response will be published.
67
71
68
72
As an alternative to a connection string, you can pass an instance of `AzureBusMessageFactory` to the `AzureBusServer` constructor and provide your own [NamespaceManager](https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicebus.namespacemanager?redirectedfrom=MSDN&view=azureservicebus-4.1.1#microsoft_servicebus_namespacemanager) and [MessagingFactory](https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.messagingfactory?view=azureservicebus-4.1.1).
69
73
@@ -118,9 +122,24 @@ using (var mqClient = mqServer.CreateMessageQueueClient())
118
122
}
119
123
```
120
124
121
-
Note that `brokeredMsg` parameter of `GetMessageFilter` when explicitly retrieving a message results in a timeout.
125
+
Note that the `brokeredMsg` parameter of `GetMessageFilter` can be null when explicitly retrieving a message results in a timeout.
126
+
127
+
## Whitelisting priority messages and publishing responses
128
+
129
+
By default, all registered handlers will result in listening to a normal priority queue and a high priority queue. As well, all message responses get published to their respective queues.
130
+
131
+
Priority messages and publishing responses can be entirely disabled by setting `DisablePriorityQueues` and `DisablePublishingResponses` respectively to true.
132
+
133
+
It is also possible to whitelist the priority queues and responses to publish by message type.
0 commit comments