K
K
Konstantin2019-01-16 23:20:41
RabbitMQ
Konstantin, 2019-01-16 23:20:41

Do I need to create an exchange in Rabbit MQ?

I have a complex routing scheme built in Rabbit MQ with multiple Exchanges.
Do I need to create all these exchanges in advance during the first initialization, or can they be created dynamically when sending a message?
Shown in the image is an Exchange relationship diagram
5c3f931b3779d086068631.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2019-01-17
@yarkin

When sending to a non-existent exchanger, there will be an AMQP protocol error, which the client can process and, for example, ignore. The question here is more different: who will be the consumer of the message being sent? After all, if no queue is subscribed to the exchanger, the message will simply be discarded. Usually, if the absence of the recipient is a normal scenario, then you need to create an exchanger (their chain) at the time the recipient creates the queue.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question