Skip to content

Commit c836a69

Browse files
andreea-anamariaandreea_cojocaru
andauthored
fixes #32
Co-authored-by: andreea_cojocaru <andreea.cojocaru@emag.ro>
1 parent 01c7f38 commit c836a69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

RabbitMq/BaseAmqp.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ protected function queueDeclare()
225225

226226
if (isset($this->queueOptions['routing_keys']) && count($this->queueOptions['routing_keys']) > 0) {
227227
foreach ($this->queueOptions['routing_keys'] as $routingKey) {
228-
$this->queueBind($queueName, $this->exchangeOptions['name'], $routingKey);
228+
$this->queueBind($queueName, $this->exchangeOptions['name'], $routingKey, $this->queueOptions['arguments'] ?? []);
229229
}
230230
} else {
231-
$this->queueBind($queueName, $this->exchangeOptions['name'], $this->routingKey);
231+
$this->queueBind($queueName, $this->exchangeOptions['name'], $this->routingKey, $this->queueOptions['arguments'] ?? []);
232232
}
233233

234234
$this->queueDeclared = true;
@@ -242,11 +242,11 @@ protected function queueDeclare()
242242
* @param string $exchange
243243
* @param string $routing_key
244244
*/
245-
protected function queueBind($queue, $exchange, $routing_key)
245+
protected function queueBind($queue, $exchange, $routing_key, array $arguments = array())
246246
{
247247
// queue binding is not permitted on the default exchange
248248
if ('' !== $exchange) {
249-
$this->getChannel()->queue_bind($queue, $exchange, $routing_key);
249+
$this->getChannel()->queue_bind($queue, $exchange, $routing_key, false, $arguments);
250250
}
251251
}
252252

0 commit comments

Comments
 (0)