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
The package makes the `IAzureServiceBusMessageHandler<>` interface available. Implementing this interface is the simplest way of creating a *'message handler'*.
34
+
The package makes the `IServiceBusMessageHandler<>` interface available. Implementing this interface is the simplest way of creating a *'message handler'*.
35
35
36
36
As the generic type, you can use the DTO (data-transfer object) to which the [`ServiceBusReceivedMessage.Body`](https://learn.microsoft.com/en-us/dotnet/api/azure.messaging.servicebus.servicebusreceivedmessage.body) should be deserialized to (default via JSON). In this case: `MyOrder`.
@@ -273,23 +275,20 @@ When your message handler interacts with an external dependency, that dependency
273
275
To interact with the message processing system within your *message handler*, you can inherit from the `CircuitBreakerServiceBusMessageHandler<>`, which allows you to 'enrich' your handler with circuit-breaker functionality.
* Renamed `IAzureServiceBusMessageHandler<>` to `IServiceBusMessageHandler<>` (in namespace `Arcus.Messaging.ServiceBus`)
56
+
* Renamed `AzureServiceBusMessageContext` to `ServiceBusMessageContext` (in namespace `Arcus.Messaging.ServiceBus`)
57
+
* Renamed `CircuitBreakerServiceBusMessageHandler<>` to `DefaultCircuitBreakerServiceBusMessageHandler<>` (in namespace `Arcus.Messaging.ServiceBus`)
54
58
55
59
### ✨ New Service Bus message pump registration
56
60
Previously, the registration of the Azure Service Bus message pump involved navigating through the many available extensions, making it rather tedious to find the right authentication mechanism.
Previous versions used dedicated 'template classes' that custom message handlers should inherit from to do custom Azure Service Bus message settlement (complete, dead-letter, abandon).
105
109
106
-
Starting from v3.0, the available operations are moved to the `AzureServiceBusMessageContext`. Making your custom message handlers much more accessible and flexible.
110
+
Starting from v3.0, the available operations are moved to the `ServiceBusMessageContext` (previously called `AzureServiceBusMessageContext`). Making your custom message handlers much more accessible and flexible.
107
111
108
112
```diff
113
+
+ using Arcus.Messaging.ServiceBus;
114
+
109
115
public class OrderServiceBusMessageHandler
110
116
- : AzureServiceBusMessageHandler<Order>
111
-
+ : IAzureServiceBusMessageHandler<Order>
117
+
+ : IServiceBusMessageHandler<Order>
112
118
{
113
119
public OrderServiceBusMessageHandler(ILogger<OrderServiceBusMessageHandler> logger)
114
120
- : base(logger)
@@ -119,7 +125,8 @@ public class OrderServiceBusMessageHandler
/// Creates a new instance of the <see cref="AzureServiceBusMessageContext"/> based on the current Azure Service bus situation.
72
+
/// Creates a new instance of the <see cref="ServiceBusMessageContext"/> based on the current Azure Service bus situation.
87
73
/// </summary>
88
74
/// <param name="jobId">The unique ID to identity the Azure Service bus message pump that is responsible for pumping messages from the <paramref name="receiver"/>.</param>
89
75
/// <param name="entityType">The type of Azure Service bus entity that the <paramref name="receiver"/> receives from.</param>
90
76
/// <param name="receiver">The Azure Service bus receiver that is responsible for receiving the <paramref name="message"/>.</param>
91
77
/// <param name="message">The Azure Service bus message that is currently being processed.</param>
92
78
/// <exception cref="ArgumentNullException">Thrown when one of the parameters is <c>null</c>.</exception>
93
-
publicstaticAzureServiceBusMessageContextCreate(
79
+
publicstaticServiceBusMessageContextCreate(
94
80
stringjobId,
95
81
ServiceBusEntityTypeentityType,
96
82
ServiceBusReceiverreceiver,
@@ -101,7 +87,7 @@ public static AzureServiceBusMessageContext Create(
0 commit comments