Skip to content

Commit 08fb719

Browse files
committed
Update AMQP.php
add a routing key to a push to exchange to facilitate proper routing of topics
1 parent f618952 commit 08fb719

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Codeception/Module/AMQP.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ public function _before(\Codeception\TestCase $test)
114114
* @param $exchange
115115
* @param $message string|AMQPMessage
116116
*/
117-
public function pushToExchange($exchange, $message)
117+
public function pushToExchange($exchange, $message, $routing_key)
118118
{
119119
$message = $message instanceof AMQPMessage
120120
? $message
121121
: new AMQPMessage($message);
122-
$this->connection->channel()->basic_publish($message, $exchange);
122+
$this->connection->channel()->basic_publish($message, $exchange, $routing_key);
123123
}
124124

125125
/**
@@ -201,4 +201,4 @@ protected function cleanup()
201201
}
202202
}
203203
}
204-
}
204+
}

0 commit comments

Comments
 (0)