ssi-anik / amqp

php-amqplib wrapper that eases the consumption of RabbitMQ. A painless way of using RabbitMQ
https://packagist.org/packages/anik/amqp
MIT License
134 stars 23 forks source link

Is there a way to create binding dynamically on publish? #9

Closed dlnsk closed 4 years ago

dlnsk commented 4 years ago

Is there a way to create binding dynamically on publish?

ssi-anik commented 4 years ago

In my understanding, if you want to publish a message, all you need is the exchange. If you don't start listening from a queue connected to that exchange, the message will be lost. So, dynamically creating an exchange to publish a message can mean two things.

  1. You want to create the exchange dynamically and listen from that exchange dynamically, then it's okay.
  2. If you create an exchange dynamically and don't listen to that exchange, it'll be lost. So doesn't make sense IMO.