简体   繁体   English

Spring集成中带RPC的RabbitMQ示例

[英]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. 我正在寻找的是通过Spring Integration实现此示例( https://www.rabbitmq.com/tutorials/tutorial-six-spring-amqp.html )。 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. 我发现了这样一个有趣的帖子( Spring与Rabbit AMQP集成,用于“客户端发送消息->服务器在返回队列上接收并返回味精->客户端获取相关的味精” ),但是并没有帮助我满足我的需求。 My case mill be a system where a client call the "convertSendAndReceive" method and a server (basede on Spring Integration) will response. 我的案例分析器是一个系统,其中客户端调用“ convertSendAndReceive”方法,服务器(基于Spring Integration)将响应。

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 Spring Integration AMQP支持为您提供了带有内置关联功能的那些实现: https : //docs.spring.io/spring-integration/docs/5.0.0.RELEASE/reference/html/amqp.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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