开发者

How to implement paired connection between server client using RabbitMQ?

开发者 https://www.devze.com 2023-02-19 19:32 出处:网络
Well i am intending to implement a paired connection between server and client , as of now i have sent chunk of data and code to the slave system using rabbitMq and the slave system executes it . But

Well i am intending to implement a paired connection between server and client , as of now i have sent chunk of data and code to the slave system using rabbitMq and the slave system executes it . But i am unable to again send back the code to server , since rabbitMq h开发者_运维百科as the classic implementation of Publisher / subscriber model . Is there any way to go around this and ensure that the server also fetches result from the slave systems ? i am using python bindings for rabbitMQ .


You can easily simulate RPC semantics with RabbitMQ (or indeed, any messaging system). All you need is a form of correlation identifier so that the response message can be tracked and interpreted as the "answer" for the original request.

Luckily, the RabbitMQ online documentation has an entire page with examples on how to do this using Python.

0

精彩评论

暂无评论...
验证码 换一张
取 消