-
I need to connect to an existing queue in a RabbitMQ instance where I don't have permission to create exchanges. My goal is to consume messages from this queue, not to produce or publish them. For example, the queue "demo-queue" already exists and is bound to an existing exchange "demo-existing-exchange," where messages are published by another producer. I'm have to configure the consumer using the ConsumerDefinition class. Here is my current code:
In my testing environment, where I have full permissions, I manually created both the "demo-queue" and "demo-existing-exchange," and I bound the queue to the exchange. When I run the application, it correctly consumes messages from the queue, but MassTransit still creates a new exchange named "demo-queue." I want to prevent this because, in the production RabbitMQ instance, I won't have permission to create exchanges. Is there a way to stop this exchange from being created? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
MassTransit always declares exchanges and queues, and there is no way to decouple the exchange and queue named by the receive endpoint. |
Beta Was this translation helpful? Give feedback.
MassTransit always declares exchanges and queues, and there is no way to decouple the exchange and queue named by the receive endpoint.