dapper91 / pjrpc

python json-rpc client/server without boilerplate
https://pjrpc.readthedocs.io
The Unlicense
30 stars 3 forks source link

examples/kombu_*.py: Add missing methods and use jsonrpc a non-durable queue #60

Closed bernhardkaindl closed 2 years ago

bernhardkaindl commented 2 years ago

Implement the sum(a, b) and tick RPC endpoints for kombu_client.py and aio_pika_client.py and use queue_args={"durable": False} to be able to connect to the "jsonrpc" queue created by examples/aio_pika_*.py. Makes it also interoperable with these examples.

examples/kombu_server.py and examples/kombu_client.py appear to have an issue communicating with each other: The RPC gets stuck very often, but server/client cross-operation with examples/aiopika*.py works fine.

This issue is present with the "jsonrpc" set to durable as well.

codecov-commenter commented 2 years ago

Codecov Report

Merging #60 (a16fada) into dev (6a4afe8) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev      #60   +/-   ##
=======================================
  Coverage   78.67%   78.67%           
=======================================
  Files          38       38           
  Lines        2377     2377           
=======================================
  Hits         1870     1870           
  Misses        507      507           
Flag Coverage Δ
unittests 78.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8c258b4...a16fada. Read the comment docs.

dapper91 commented 2 years ago

@bernhardkaindl Did you manage to figure out why kombu client gets stuck?

bernhardkaindl commented 2 years ago

@bernhardkaindl Did you manage to figure out why kombu client gets stuck?

No, I see in the rabbitmq log that both stay connected, but the client does not continue sending requests:

From the kombu_server log, I see that the server sends the response for the sum method, but the client does not have any logger calls about sending requests or receiving responses.

I think this lack of logging in the kombu client should be fixed next to ease debugging the combu client in general - ok?

dapper91 commented 2 years ago

@bernhardkaindl Could you report an issue, I suppose I have some guesses.

dapper91 commented 2 years ago

approved

bernhardkaindl commented 2 years ago

Thanks, opened issue #66