fixes RPC client/server
This commit is contained in:
parent
5b6b2d825b
commit
1fd024dd4d
@ -22,7 +22,7 @@ class FibonacciRpcClient {
|
||||
array($this, 'on_response'));
|
||||
}
|
||||
public function on_response($rep) {
|
||||
if($rep->properties['correlation_id'] == $this->corr_id) {
|
||||
if($rep->get('correlation_id') == $this->corr_id) {
|
||||
$this->response = $rep->body;
|
||||
}
|
||||
}
|
||||
|
@ -24,11 +24,11 @@ $callback = function($req) {
|
||||
|
||||
$msg = new AMQPMessage(
|
||||
(string) fib($n),
|
||||
array('correlation_id' => $req->properties['correlation_id'])
|
||||
array('correlation_id' => $req->get('correlation_id'))
|
||||
);
|
||||
|
||||
$req->delivery_info['channel']->basic_publish(
|
||||
$msg, '', $req->properties['reply_to']);
|
||||
$msg, '', $req->get('reply_to'));
|
||||
$req->delivery_info['channel']->basic_ack(
|
||||
$req->delivery_info['delivery_tag']);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user