Closed baxter19 closed 8 years ago
Looks like it is possible to set this via the VirtualHost property
$vhostProp = [RabbitMQ.Client.ConnectionFactory].GetProperty("VirtualHost") $vhostProp.SetValue($Factory, "myvhost")
I believe I have this working by hard coding the value inside of New-RabbitMQConnectionFactory. If we were to add an optional -VHost parameter that could be passed through from the Send-RabbitMQMessage function I think we could expose this to callers.
Makes sense to me - Adding this to the list, but feel free to submit a pull request if you'd like it integrated sooner!
I have an exchange that is only accessible via a custom vhost. When I try to use the Send-RabbitMqMessage module to publish a message I get an error that the specified endpoint was not available.
The RabbitMQ logs shows the following error:
{amqp_error,access_refused, "access to vhost '/' refused for user 'mytest'", 'connection.open'}}
Is there any way to tell the Send-RabbitMQMessage module to connect to an alternate vhost?