Skip to content

Passing Aspire-Configured RabbitMQ Credentials to Environment Variables #6986

Answered by davidfowl
sharpzilla asked this question in Q&A
Discussion options

You must be logged in to vote

When you use WithReference, we pass connection information to the target resource (a project in your example). Each of the integration has the documented connection format for each resource. For RabbitMQ:
https://learn.microsoft.com/en-us/dotnet/aspire/messaging/rabbitmq-integration?tabs=dotnet-cli#use-a-connection-string

On top of that, each resource has an object model with various properties:

https://learn.microsoft.com/en-us/dotnet/api/aspire.hosting.applicationmodel.rabbitmqserverresource?view=dotnet-aspire-8.0#properties

Those properties are used to create the default connection string that is used by WithReference, e.g For RabbitMQServerResource (which is the resource type when you…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davidfowl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants