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
Feature - provide specific Azure Service Bus message operations during message handling (#119)
* Feature - provide specific Azure Service Bus message operations during message handling
* pr-sug: add single not-matching message handler to the message pump
* pr-sug: add sending of the order message
* pr-sug: don't autocomplete in dead letter scenario
* pr-sug: extra logging + more strict build pipelines
* pr-sug: use public service type
* pr-fix: use correct dead letter queue
* pr-add: integration test with abandoning the message
* pr-fix: use correct logger property
* pr-add: integration test for abandoning mesasges
* pr-docs: update docs with influence features
* pr-test: update with finishing touches on the comments and clarity
* pr-fix: not autocomplete on abandon
* pr-fix: update with static delivery count
* Update docs/preview/features/message-pumps/service-bus.md
Co-authored-by: Tom Kerkhove <[email protected]>
* Update docs/preview/features/message-pumps/service-bus.md
Co-authored-by: Tom Kerkhove <[email protected]>
* Update src/Arcus.Messaging.Pumps.ServiceBus/AzureServiceBusMessagePump.cs
Co-authored-by: Tom Kerkhove <[email protected]>
* Update src/Arcus.Messaging.Pumps.ServiceBus/AzureServiceBusMessagePump.cs
Co-authored-by: Tom Kerkhove <[email protected]>
* Update src/Arcus.Messaging.Pumps.ServiceBus/MessageHandling/AzureServiceBusFallbackMessageHandler.cs
Co-authored-by: Tom Kerkhove <[email protected]>
* Update src/Arcus.Messaging.Pumps.ServiceBus/MessageHandling/AzureServiceBusFallbackMessageHandler.cs
Co-authored-by: Tom Kerkhove <[email protected]>
* Update src/Arcus.Messaging.Pumps.ServiceBus/MessageHandling/AzureServiceBusFallbackMessageHandler.cs
Co-authored-by: Tom Kerkhove <[email protected]>
* Update src/Arcus.Messaging.Pumps.ServiceBus/MessageHandling/AzureServiceBusFallbackMessageHandler.cs
Co-authored-by: Tom Kerkhove <[email protected]>
* Update src/Arcus.Messaging.Pumps.ServiceBus/MessageHandling/AzureServiceBusFallbackMessageHandler.cs
Co-authored-by: Tom Kerkhove <[email protected]>
* pr-sug: add xml docs for 'Service' prop
* pr-sug: update logs with extra information and lower cases
Co-authored-by: Tom Kerkhove <[email protected]>
Copy file name to clipboardExpand all lines: docs/preview/features/message-pumps/service-bus.md
+91-2Lines changed: 91 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ Azure Service Bus Message Pump will perform all the plumbing that is required fo
14
14
- Provide telemetry
15
15
16
16
As a user, the only thing you have to do is **focus on processing messages, not how to get them**.
17
-
18
17
You can do this by creating a message handler which implements from `IAzureServiceBusMessageHandler<TMessage>` (or `IMessageHandler<TMessage, MessageContext>`).
19
18
20
19
Here is an example of a message handler that expects messages of type `Order`:
@@ -57,6 +56,13 @@ public class OrdersMessageHandler : IMessageHandler<Order>
-[Influence handling of Service Bus message in a message handler](#influence-handling-of-Service-Bus-message-in-message-handler)
64
+
-[Correlation](#correlation)
65
+
60
66
## Configuration
61
67
62
68
Once the message handler is created, you can very easily configure it:
@@ -194,6 +200,89 @@ public void ConfigureServices(IServiceCollection services)
194
200
}
195
201
```
196
202
203
+
## Influence handling of Service Bus message in message handler
204
+
205
+
When an Azure Service Bus message is received (either via regular message handlers or fallback message handlers), we allow specific Azure Service Bus operations during the message handling.
206
+
Currently we support [**Dead letter**](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues) and [*Abandon**](https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.messagereceiver.abandon?view=azure-dotnet).
207
+
208
+
### During (regular) message handling
209
+
210
+
To have access to the Azure Service Bus operations, you have to implement the `abstract``AzureServiceBusMessageHandler<T>` class.
211
+
Behind the screens it implements the `IMessageHandler<>` interface, so you can register this the same way as your other regular message handlers.
212
+
213
+
This base class provides several protected methods to call the Azure Service Bus operations:
0 commit comments