Closed bslima closed 11 years ago
That makes no sense:
promise = self.client.connect(callback=self.on_connected)
self.client.wait(promise,timeout=2)#Waits 2s
so you want a callback or you want to wait on a promise?
Also, you're using a single puka connection from multiple threads. That just won't work.
The problem is not on the wait and the callback, that works fine. So what is the difference between puka and pika ? For what i read puka allows me to share connection between threads.
The problem is not on the wait and the callback, that works fine.
Yes, I know. It just doesn't make any sense. You may as well do "self.client.wait(promise); self.on_connected()" and it will be so much more readable.
So what is the difference between puka and pika ?
They are two separate projects.
For what i read puka allows me to share connection between threads.
Interesting, where did you read that?
I'm trying to write a threaded rpc communication with puka and rabbitmq. But i'm keeping getting:
puka.spec_exceptions.PreconditionFailed: {'class_id': 60, 'method_id': 80, 'reply_code': 406, 'reply_text': 'PRECONDITION_FAILED - unknown delivery tag X'}, where X can be any msg number.
The error is always on the RPCServer, following my code:
Is there anyway to get this server done in a thread for every request ??
Thanks in advance.