dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.82k stars 453 forks source link

Allow Configuring RabbitMQ to use TLS #6543

Open Jaryllan opened 4 days ago

Jaryllan commented 4 days ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

I am trying to configure RabbitMQ with TLS enabled. But due to the internals are hardcoded to port "5672" and the scheme is hardcoded to "amqp", the connectionstring generated will always be stuck at connecting to amqp and is routed to port 5672.

Image

Image

Describe the solution you'd like

When RabbitMQ is tls enabled,

  1. Attaching the rabbitmq as reference to other projects, the connectionstring's scheme need to be amqps and the port is routed to 5671.
  2. Allow the necessary certificates to be passed on to the projects that references to rabbitmq.

Additional context

No response

joperezr commented 3 days ago

Is this something that can be workaround with manually setting the endpoint? @mitchdenny can you take a look?

joperezr commented 3 days ago

We should make sure there is a workaround here.

davidfowl commented 3 days ago

You can override the endpoint port, but we don't have a way to override the scheme. We should change the connection string to set the scheme amqp instead of hardcoding it. That way mutating the endpoint would allow both the port and scheme to be changed.