Closed thomasvargiu closed 8 years ago
This PR allows to bind queues with the defined exchange name property, not with the exchange key in configuration.
name
Actually you can define exchanges in configuration like this (note different configuration key and name):
return [ 'humus' => [ 'amqp' => [ 'exchange' => [ 'my-exchange-key' => [ 'connection' => 'amqp.connection.default', 'name' => 'my-exchange', 'type' => 'fanout', ], ], ], ], ];
But you can't define a queue like this:
return [ 'humus' => [ 'amqp' => [ 'queue' => [ 'my-queue' => [ 'connection' => 'amqp.connection.default', 'name' => 'my-queue', 'exchanges' => [ 'my-exchange-key' => [], ], ], ], ], ], ];
The queue factory looks for the exchange via configuration key and binds it with this key, not with the real exchange name.
This PR fix this problem.
Coverage increased (+0.009%) to 94.891% when pulling 304acb44bd69029233e5eb0739dacfbcfaee0ea2 on thomasvargiu:feature/exchange-service-name into 01228cc9524555326ef701f3de9b661441a66bfe on prolic:master.
Thanks for the PR. I need to have a closer look when I have time.
good catch!
This PR allows to bind queues with the defined exchange
name
property, not with the exchange key in configuration.Actually you can define exchanges in configuration like this (note different configuration key and
name
):But you can't define a queue like this:
The queue factory looks for the exchange via configuration key and binds it with this key, not with the real exchange name.
This PR fix this problem.