RabbitMQBuilderExtensions.AddRabbitMQ Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a RabbitMQ container to the application model.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource> AddRabbitMQ (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource>? userName = default, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource>? password = default, int? port = default);
static member AddRabbitMQ : Aspire.Hosting.IDistributedApplicationBuilder * string * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RabbitMQServerResource>
<Extension()>
Public Function AddRabbitMQ (builder As IDistributedApplicationBuilder, name As String, Optional userName As IResourceBuilder(Of ParameterResource) = Nothing, Optional password As IResourceBuilder(Of ParameterResource) = Nothing, Optional port As Nullable(Of Integer) = Nothing) As IResourceBuilder(Of RabbitMQServerResource)
Parameters
- name
- String
The name of the resource. This name will be used as the connection string name when referenced in a dependency.
- userName
- IResourceBuilder<ParameterResource>
The parameter used to provide the user name for the RabbitMQ resource. If null
a default value will be used.
- password
- IResourceBuilder<ParameterResource>
The parameter used to provide the password for the RabbitMQ resource. If null
a random password will be generated.
Returns
A reference to the IResourceBuilder<T>.
Remarks
This version of the package defaults to the tag of the container image.