-
Notifications
You must be signed in to change notification settings - Fork 866
Expand file tree
/
Copy pathAzureServiceBusQueueHealthCheckOptions.cs
More file actions
39 lines (35 loc) · 1.81 KB
/
AzureServiceBusQueueHealthCheckOptions.cs
File metadata and controls
39 lines (35 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace HealthChecks.AzureServiceBus.Configuration;
/// <summary>
/// Configuration options for <see cref="AzureServiceBusQueueHealthCheck"/>.
/// </summary>
public class AzureServiceBusQueueHealthCheckOptions : AzureServiceBusHealthCheckOptions
{
/// <summary>
/// The name of the queue to check.
/// </summary>
public string QueueName { get; set; }
/// <summary>
/// Will use <c>PeekMessageAsync</c> method to determine status if set to <see langword="true"/> (default),
/// otherwise; will use <c>GetProperties*</c> method.
/// </summary>
/// <remarks>
/// Peek requires Listen claim to work. However, if only Sender claim using the Azure built-in roles (RBAC)
/// <see href="https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#azure-service-bus-data-sender">Azure Service Bus Data Sender</see>
/// is used set this to <see langword="false"/>. By default <see langword="true"/>.
/// </remarks>
public bool UsePeekMode { get; set; } = true;
/// <summary>
/// Will use <c>CreateMessageBatchAsync</c> method to determine status if set to <see langword="true"/> (default),
/// otherwise; will use <c>GetProperties*</c> method.
/// </summary>
/// <remarks>
/// CreateMessageBatch requires Send claim to work. However, if only Receiver claim using the Azure built-in roles (RBAC)
/// <see href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/integration#azure-service-bus-data-receiver">Azure Service Bus Data Receiver</see>
/// is used set this to <see langword="false"/>. By default <see langword="true"/>.
/// </remarks>
public bool UseCreateMessageBatchAsyncMode { get; set; } = true;
public AzureServiceBusQueueHealthCheckOptions(string queueName)
{
QueueName = queueName;
}
}