I'm quite new with RabbitMQ and I've got to implement a .NET client that needs to publish messages to an Exchange entity on a RabbitMQ server hosted by a third party.
The connection to the server seems to work well but then, things are gettings worse when I want to declare a channel to the Exchange I have to use.
using (var connection = connectionFactory.CreateConnection())
{
IModel model = connection.CreateModel();
model.ExchangeDeclare(exchangeName, ExchangeType.Direct);
// ... the rest of the code is never reached
}
With these lines, I get an exception from the server with this message
The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=403, text="ACCESS_REFUSED - access to exchange ... in vhost ... refused for user ...", classId=40, methodId=10, cause=
"Connection Closed, error code 403 (ACCESS_REFUSED)"
What does it mean? Does it mean that the third party which provided me with the credentials to connect to the AMQP server, hasn't granted the adequate privileges on the Exchange "exchangeName"? Or am I doing something wrong in my client? Do I really need to call ExchangeDeclare
?
Thanks for the help