Skip to content

Fixed exchange message publishing

Compare
Choose a tag to compare
@31vi5 31vi5 released this 21 May 14:14
· 86 commits to master since this release
8f7dae1

Fixed publishing of messages to exchanges.

Exchanges now accept connection parameter.

Breaking changes:

  • Producer::publish() method of class now accepts third parameter $routingKey, which allows to propagate messages correctly through exchanges.
  • Exchanges now publish messages in a different way. If you relied on the old (incorrect) way, you will probably have to adjust your code as the old version published one messages for each bound queue with a routing key that was defined in config for the queue binding (instead of message's routing key) basically rendering all exchanges as type fanout in better case, in worse case, if two or more queues shared a routing key, they would have received the message N times where N is the number of queues bound with the same key.