# AzureServiceBusQueueResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.ServiceBus](/reference/api/csharp/aspire.hosting.azure.servicebus.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusQueueResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<AzureServiceBusResource>`, `IValueProvider`, `IValueWithReferences`, `IResourceWithAzureFunctionsConfig`

Represents a Service Bus Queue. Initializes a new instance of the [AzureServiceBusQueueResource](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource.md) class.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureServiceBusQueueResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IResourceWithParent,
      Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.Azure.AzureServiceBusResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences,
      Aspire.Hosting.Azure.IResourceWithAzureFunctionsConfig
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Azure.ServiceBus/AzureServiceBusQueueResource`

## Remarks

Use `AzureProvisioningResourceExtensions.ConfigureInfrastructure` to configure specific `Azure.Provisioning` properties.

## Constructors

- [AzureServiceBusQueueResource(string, string, AzureServiceBusResource)](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/constructors.md#constructor-string-string-azureservicebusresource) -- Represents a Service Bus Queue. Initializes a new instance of the [AzureServiceBusQueueResource](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource.md) class.

## Properties

- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the Azure Service Bus Queue.
- [DeadLetteringOnMessageExpiration](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#deadletteringonmessageexpiration) : `bool?` `get; set` -- A value that indicates whether this queue has dead letter support when a message expires.
- [DefaultMessageTimeToLive](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#defaultmessagetimetolive) : `TimeSpan?` `get; set` -- ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
- [DuplicateDetectionHistoryTimeWindow](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#duplicatedetectionhistorytimewindow) : `TimeSpan?` `get; set` -- ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
- [ForwardDeadLetteredMessagesTo](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#forwarddeadletteredmessagesto) : `string?` `get; set` -- Queue/Topic name to forward the Dead Letter message.
- [ForwardTo](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#forwardto) : `string?` `get; set` -- Queue/Topic name to forward the messages.
- [LockDuration](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#lockduration) : `TimeSpan?` `get; set` -- ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.
- [MaxDeliveryCount](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#maxdeliverycount) : `int?` `get; set` -- The maximum delivery count. A message is automatically dead-lettered after this number of deliveries.
- [Parent](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#parent) : [AzureServiceBusResource](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusresource.md) `get` -- Gets the parent Azure Service Bus resource.
- [QueueName](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#queuename) : `string` `get; set` -- The queue name.
- [RequiresDuplicateDetection](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#requiresduplicatedetection) : `bool?` `get; set` -- A value indicating if this queue requires duplicate detection.
- [RequiresSession](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusqueueresource/properties.md#requiressession) : `bool?` `get; set` -- A value that indicates whether the queue supports the concept of sessions.
