Open Biktop opened 9 years ago
There is no exchange you need. Sender must init this exchange before sending messages
But how is it possible? In my use case I run receiver as daemon (./yii rabbit) and after that my Web application sends requests to daemon. What I can do in my case?
Using of topic exchange means one sender and one or more receiver(s). Sender runs first and creates exchange. Then it can send messages. Sender don't know about any receivers. Receiver(s) know about sender and describe to this created exchange.
If your sender know about receiver and you will nerer use more than one receivers use dierect exchange.
Using of direct exchange means sending the mesages for reciving answers from daemon. Topic is for informing only.
Related topic and direct modes that's ok. Are there any problems to call exchange_declare for receiver in topic mode? Because I still don't understand how run receiver after senders.
I tried to run sample and command ./yii rabbit throw exception: AMQPProtocolChannelException with message 'NOT_FOUND - no exchange 'my-exchange' in vhost '/'.
I found if comment if ($type == Amqp::TYPE_DIRECT) then receiver works well.
Is it bug in sources?