简体   繁体   中英

Example of RabbitMQ with RPC in Spring Integration

After make a search about different ways to implement it, im stuck. What im looking for is to realize this example ( https://www.rabbitmq.com/tutorials/tutorial-six-spring-amqp.html ) with Spring Integration. I had found interesting post as this ( Spring integration with Rabbit AMQP for "Client Sends Message -> Server Receives & returns msg on return queue --> Client get correlated msg" ) but didn't help me with what i need. My case mill be a system where a client call the "convertSendAndReceive" method and a server (basede on Spring Integration) will response.

Thanks

According to your explanation it sounds like Outbound Gateway on the Client side and Inbound Gateway on the Server side pair is what you need.

Spring Integration AMQP support provides those implementations for you with built-in correlation functionality: https://docs.spring.io/spring-integration/docs/5.0.0.RELEASE/reference/html/amqp.html

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