fixes RPC client/server

This commit is contained in:
Alvaro Videla 2013-07-29 16:42:25 +02:00
parent 5b6b2d825b
commit 1fd024dd4d
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}
}

View File

@ -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']);
};