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
+20-4
Original file line number
Diff line number
Diff line change
@@ -47,12 +47,14 @@ The [AzureBusServer](src\ServiceStack.AzureServiceBus\AzureBusServer.cs) has the
47
47
-`int`**RetryCount** - How many times a message should be retried before sending to the DLQ.
48
48
-`string`**connectionString** - The connection string to the Azure Service Bus namespace
49
49
-`IMessageFactory`**MessageFactory** - the MQ Message Factory used by this MQ Server
50
+
-`Action<QueueDescription>`**CreateQueueFilter** - A filter to customize the options Azure Queues are created/updated with.
50
51
51
-
As an alternative to the connection string, you can pass an instance of `AzureBusMessageFactory` to the `AzureBusServer` constructor allowing you to 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)
52
+
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).
52
53
53
-
Starting the MQ Server will create up to 2 threads for each handler, one to listen to the Message Inbox `mq-{RequestDto}.inq` and another to listen on the Priority Queue located at `mq-{RequestDto}.priorityq`.
54
+
Starting the MQ Server will create up to 2 threads for each handler, one to listen to the Message Inbox `{RequestDto}.inq` and another to listen on the Priority Queue located at `{RequestDto}.priorityq`.
54
55
55
-
> Queue names are limited to alphanumeric, period, hyphen and underscore in Azure Service Bus. As such, names from the ServiceStack utility [QueueNames<T>](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/Messaging/QueueNames.cs) will differ from the actual queue name.
56
+
> Queue names are limited to alphanumeric, period, hyphen and underscore in Azure Service Bus. As such, the default prefixes from [QueueNames](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/Messaging/QueueNames.cs) and the queue name resolver get overriden by `AzureBusMessageFactory`. The deadletter queue name resolves to `RequestDto.inq/$deadletterqueue`.
57
+
> Finally, note that queue names are case-insensitive in Azure Service Bus.
56
58
57
59
By default, only 1 thread is allocated to handle each message type, but like the other MQ Servers is easily configurable at registration:
> Behind the scenes, it delegates the work to Azure Service Bus [event-driven message pump](https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.messagereceiver.onmessage?view=azureservicebus-4.1.1#Microsoft_ServiceBus_Messaging_MessageReceiver_OnMessage_System_Action_Microsoft_ServiceBus_Messaging_BrokeredMessage__Microsoft_ServiceBus_Messaging_OnMessageOptions_).
64
66
67
+
### Filters
68
+
69
+
To modify the options a queue gets created with, provide a `CreateQueueFilter` filter and modify the `QueueDescription`.
70
+
71
+
For instance, to change the default TTL and have messages expire automatically after 2 minutes:
72
+
```
73
+
container.Register<IMessageService>(c => new AzureBusServer(ConnectionString) {
0 commit comments