-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 4.1 |
If you are publishing messages only (and another application is receiving them), then a queue should not be declared/bound.
The queue declaration and binding found here:
symfony/src/Symfony/Component/Messenger/Adapter/AmqpExt/Connection.php
Lines 156 to 157 in ccb0e84
$this->queue()->declareQueue(); | |
$this->queue()->bind($this->exchange()->getName(), $this->queueConfiguration['routing_key'] ?? null); |
Should not run within publish()
symfony/src/Symfony/Component/Messenger/Adapter/AmqpExt/Connection.php
Lines 95 to 102 in ccb0e84
public function publish(string $body, array $headers = array()): void | |
{ | |
if ($this->debug) { | |
$this->setup(); | |
} | |
$this->exchange()->publish($body, null, AMQP_NOPARAM, array('headers' => $headers)); | |
} |
The work around to this issue, is to ensure that the application listening for the messages uses the same queue name.