Permalink
Browse files

Change the publish parameter ordering

  • Loading branch information...
1 parent 0a6df7d commit 60e2607ceacb9a72541b1e9c1bad081ec86ab085 Gavin M. Roy committed Feb 25, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 test.php
  2. +1 −1 timetest.php
  3. +3 −3 vorpalbunny.php
View
@@ -25,7 +25,7 @@
$vb = new VorpalBunny( $broker );
// Publish to our rabbitmq broker
-if ( $vb->publish( "Hello World!", "", "test" ) )
+if ( $vb->publish( "", "test", "Hello World!" ) )
{
print "Message Published\n";
}
View
@@ -41,7 +41,7 @@
for ( $x = 0; $x < $quantity; $x++ )
{
// Publish to our rabbitmq broker
- if ( ! $vb->publish( "Hello World #" . $x, "", "test" ) )
+ if ( ! $vb->publish( "", "test", "Hello World #" . $x ) )
{
print "Error publishing, exiting.\n";
break;
View
@@ -219,8 +219,8 @@ function getSessionURL( )
*
* For more information on the parameters, see http://www.rabbitmq.com/amqp-0-9-1-quickref.html#basic.deliver
*
- * @param string $message to be published, should aready be escaped/encoded
* @param string $exchange to publish the message to, can be empty
+ * @param string $message to be published, should aready be escaped/encoded
* @param string $routing_key to publish the message to
* @param string $mimetype of message content content
* @param int $delivery_mode for message: 1 non-persist message, 2 persist message
@@ -230,9 +230,9 @@ function getSessionURL( )
* @return bool Success/Failure
* @throws Exception
*/
- function publish( $message,
- $exchange,
+ function publish( $exchange,
$routing_key,
+ $message,
$mimetype = "text/plain",
$delivery_mode = 1,
$mandatory = false,

0 comments on commit 60e2607

Please sign in to comment.