I am using MassTransit with RabbitMQ and I would like to take advantage of RabbitMQ virtual hosts. Other apps in my organization (not using MassTransit) have a convention of setting up virtual hosts for environments i.e. "myapp" and "myappUAT". I need to follow this convention, but I can't figure out how to specify a virtual host in my MassTransit uri.
Is this possible? If so how can I do it?
rabbitmq://localhost/vhost_name/queue_name
is all you need. We use vhosts for most things, and just try to keep it simple :)
You can see the code pulling it out here: https://github.com/MassTransit/MassTransit/blob/v2.7.2/src/Transports/MassTransit.Transports.RabbitMq/RabbitMqEndpointAddress.cs#L167
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With