# RabbitMQServerResource Properties

- Package: [Aspire.Hosting.RabbitMQ](/reference/api/csharp/aspire.hosting.rabbitmq.md)
- Type: [RabbitMQServerResource](/reference/api/csharp/aspire.hosting.rabbitmq/rabbitmqserverresource.md)
- Kind: `Properties`
- Members: `9`

A resource that represents a RabbitMQ resource.

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L76)

Gets the connection string expression for the RabbitMQ server.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## Host

- Name: `Host`
- Modifiers: `get`
- Returns: `EndpointReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L45)

Gets the host endpoint reference for this resource.

```csharp
public EndpointReferenceExpression Host { get; }
```

## ManagementEndpoint

- Name: `ManagementEndpoint`
- Modifiers: `get`
- Returns: `EndpointReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L40)

Gets the management endpoint for the RabbitMQ server.

```csharp
public EndpointReference ManagementEndpoint { get; }
```

## PasswordParameter

- Name: `PasswordParameter`
- Modifiers: `get`
- Returns: `ParameterResource`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L71)

Gets the parameter that contains the RabbitMQ server password.

```csharp
public ParameterResource PasswordParameter { get; }
```

## Port

- Name: `Port`
- Modifiers: `get`
- Returns: `EndpointReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L50)

Gets the port endpoint reference for this resource.

```csharp
public EndpointReferenceExpression Port { get; }
```

## PrimaryEndpoint

- Name: `PrimaryEndpoint`
- Modifiers: `get`
- Returns: `EndpointReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L35)

Gets the primary endpoint for the RabbitMQ server.

```csharp
public EndpointReference PrimaryEndpoint { get; }
```

## UriExpression

- Name: `UriExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L88-L103)

Gets the connection URI expression for the RabbitMQ server.

```csharp
public ReferenceExpression UriExpression { get; }
```

## Remarks

Format: `amqp://{user}:{password}@{host}:{port}`.

## UserNameParameter

- Name: `UserNameParameter`
- Modifiers: `nullable` `get`
- Returns: `ParameterResource?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L55)

Gets the parameter that contains the RabbitMQ server user name.

```csharp
public ParameterResource? UserNameParameter { get; }
```

## UserNameReference

- Name: `UserNameReference`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs#L64-L66)

Gets a reference to the user name for the RabbitMQ server.

```csharp
public ReferenceExpression UserNameReference { get; }
```

## Remarks

Returns the user name parameter if specified, otherwise returns the default user name "guest".
