Rabbitmq with no-blocking rpc #1252
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@PhoenixNazarov according RMQ logic, we can't send multiple RPC requests at the same time using the same connection-channel pair. This reason we have client-level lock on sending RPC requests (we can't send next RPC requests while we have no answer on previous one). I thought, it shouldn't be a great problem cuz RPC logic is not targeted behavior for async services. If you want to get answers as a regular behavior, probably, you should take a look at another architecture (GRPC-based or HTTP at least) or use persistent consumer for processing replies with @broker.subscriber("reply")
async def process_reply():
...
await broker.publish(..., reply_to="reply") Using this logic you can connect request with response by RPC feature exists to send such request from time to time, but not to create RPC-based services. |
Beta Was this translation helpful? Give feedback.
@PhoenixNazarov according RMQ logic, we can't send multiple RPC requests at the same time using the same connection-channel pair. This reason we have client-level lock on sending RPC requests (we can't send next RPC requests while we have no answer on previous one). I thought, it shouldn't be a great problem cuz RPC logic is not targeted behavior for async services. If you want to get answers as a regular behavior, probably, you should take a look at another architecture (GRPC-based or HTTP at least) or use persistent consumer for processing replies with
reply_to
flag like in the following example