I have a queue in RabbitMQ. I can't configurate this queue, I have to consume messages from it. Publisher don't use Masstransit for publishing. I am using Masstransit to consume messages from the queue.
When I am trying to configurate connection to the queue, I am receiving this error:
The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=406, text='PRECONDITION_FAILED - inequivalent arg 'type' for exchange 'my_queue' in vhost 'my_vhost': received 'fanout' but current is 'direct'', classId=40, methodId=10
My configuration looks like:
Bus.Factory.CreateUsingRabbitMq(cfg =>
{
cfg.Host("127.0.0.1", "my_virtual_host", credintials =>
{
credintials.Username("myuser");
credintials.Password("mypassword");
});
cfg.ReceiveEndpoint("my_queue", e =>
{
e.UseRawJsonSerializer();
e.Consumer(() => _messageConsumer);
});
}).Start();
The queue has configuration Durable = true and that's it, nothing special.
When I am trying to connect to the queue via RabbitMQ.Client, it connects without problems. Consuming works well too.
How can I solve the problem?