Skip to content
Browse files

fix example

  • Loading branch information...
1 parent 51f21d5 commit 925ff14004a44df5f6e9c51528f163ee6e00567b @bkw bkw committed
Showing with 10 additions and 1 deletion.
  1. +10 −1 examples.xml
View
11 examples.xml
@@ -30,8 +30,17 @@ $ex->bind('queue1', 'routing.key');
// Publish a message to the exchange with a routing key
$ex->publish('message', 'routing.key');
+function processMessage(AMQPEnvelope $env, AMQPQueue $queue) {
+ printf(
+ "Received Message on Queue '%s': '%s'\n",
+ $queue->getName(),
+ $env->getBody()
+ );
+ return true;
+}
+
// Read from the queue
-$msg = $q->consume();
+$q->consume('processMessage');
?>
]]>

0 comments on commit 925ff14

Please sign in to comment.
Something went wrong with that request. Please try again.