简体   繁体   中英

What are the minimum required configurations at sender side and receiver side in spring boot RabbitMQ?

I have just started with Spring boot RabbitMQ. I would like to know how can we separately configure producer code and consumer code in case of spring boot rabbitmq (annotations config). I mean to say, if I want to write rabbitmq producer code in spring boot and consumer code in python , or vice versa- consumer code in spring boot and producer code in python..I found no separate producer and consumer configurations in spring boot. For example,in case of Spring XML configuration, at the sender side, we only have exchange name and routing key available. There is no information at the producer side regarding queue name or type of exchange. But in contrast to this, in case of Spring boot, the Queue is configured at the sender side only, including the exchange binding. Can you please help me with separate sender and receiver configurations using spring boot. I am working on cross technology rabbitmq. So I would like to know sender and receiver minimum configurations required. Please help.

For eg- https://github.com/Civilis317/spring-amqp , in this code, at the producer side, in configuration file, the queue is configured. But in case of xml configuration, the producer had no idea about the queue. I would like to know what is the minimum configuration required at the sender in case of spring boot rabbitmq.

I mean to say, in xml configuration, the exchange-queue binding details were found at the consumer side xml file. But in spring boot, the exchange-queue binding is found at the sender config files only. Is it how it is written??

But in contrast to this, in case of Spring boot, the Queue is configured at the sender side only, including the exchange binding.

That is not correct. What is leading you to that conclusion?

Messages are sent to an exchange with a routing key; the producer knows nothing about the queue(s) that are bound to the exchange.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM