# AzureMessagingServiceBusSettings Properties

- Package: [Aspire.Azure.Messaging.ServiceBus](/reference/api/csharp/aspire.azure.messaging.servicebus.md)
- Type: [AzureMessagingServiceBusSettings](/reference/api/csharp/aspire.azure.messaging.servicebus/azuremessagingservicebussettings.md)
- Kind: `Properties`
- Members: `8`

Provides the client configuration settings for connecting to Azure Service Bus.

## ConnectionString

- Name: `ConnectionString`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.Messaging.ServiceBus/AzureMessagingServiceBusSettings.cs)

Gets or sets the connection string used to connect to the Service Bus namespace.

```csharp
public string? ConnectionString { get; set; }
```

## Remarks

If [AzureMessagingServiceBusSettings.ConnectionString](/reference/api/csharp/aspire.azure.messaging.servicebus/azuremessagingservicebussettings/properties.md#connectionstring) is set, it overrides [AzureMessagingServiceBusSettings.FullyQualifiedNamespace](/reference/api/csharp/aspire.azure.messaging.servicebus/azuremessagingservicebussettings/properties.md#fullyqualifiednamespace) and [AzureMessagingServiceBusSettings.Credential](/reference/api/csharp/aspire.azure.messaging.servicebus/azuremessagingservicebussettings/properties.md#credential).

## Credential

- Name: `Credential`
- Modifiers: `nullable` `get; set`
- Returns: `TokenCredential?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.Messaging.ServiceBus/AzureMessagingServiceBusSettings.cs)

Gets or sets the credential used to authenticate to the Service Bus namespace.

```csharp
public TokenCredential? Credential { get; set; }
```

## DisableTracing

- Name: `DisableTracing`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.Messaging.ServiceBus/AzureMessagingServiceBusSettings.cs)

Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.

```csharp
public bool DisableTracing { get; set; }
```

## Remarks

ServiceBus ActivitySource support in Azure SDK is experimental, the shape of Activities may change in the future without notice. It can be enabled by setting "Azure.Experimental.EnableActivitySource" `AppContext` switch to true. Or by setting "AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE" environment variable to "true".

## FullyQualifiedNamespace

- Name: `FullyQualifiedNamespace`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.Messaging.ServiceBus/AzureMessagingServiceBusSettings.cs)

Gets or sets the fully qualified Service Bus namespace.

```csharp
public string? FullyQualifiedNamespace { get; set; }
```

## Remarks

Used along with [AzureMessagingServiceBusSettings.Credential](/reference/api/csharp/aspire.azure.messaging.servicebus/azuremessagingservicebussettings/properties.md#credential) to establish the connection.

## HealthCheckQueueName

- Name: `HealthCheckQueueName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.Messaging.ServiceBus/AzureMessagingServiceBusSettings.cs)

Name of the queue used by the health check. Mandatory to get health checks enabled.

```csharp
public string? HealthCheckQueueName { get; set; }
```

## HealthCheckTopicName

- Name: `HealthCheckTopicName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.Messaging.ServiceBus/AzureMessagingServiceBusSettings.cs)

Name of the topic used by the health check. Mandatory to get health checks enabled.

```csharp
public string? HealthCheckTopicName { get; set; }
```

## QueueOrTopicName

- Name: `QueueOrTopicName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.Messaging.ServiceBus/AzureMessagingServiceBusSettings.cs)

Name of the queue or topic associated with the connection string.

```csharp
public string? QueueOrTopicName { get; set; }
```

## SubscriptionName

- Name: `SubscriptionName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Components/Aspire.Azure.Messaging.ServiceBus/AzureMessagingServiceBusSettings.cs)

Name of the subscription associated with the connection string.

```csharp
public string? SubscriptionName { get; set; }
```
