Closed ice-matcha closed 3 years ago
Same doubt here, any ideas? need something else in queue.php?
"laravel/lumen-framework": 7.0 "vladimir-yuldashev/laravel-queue-rabbitmq": 10.2.3
tks
Probably because your jobs dont specify the queue/topic. Your message is going to the default queue or topic. But because there are no endpoints (queue's) the exxhange disgards the message.
You publish agaist an exchange. The published message must contain its destination. Queues must be bound as endpoints to an exchange.
Read also tje manual of RabbitMQ. More wil be clear how rabbitMQ handles things
Thanks @adm-bome for te reply.
I upgraded the package from 7.0 to 10, in 7.0 i was able to create the exchange, queues e de bound between them automatically when the first message was pushed.
So in 10.x version i need to create all of them before push the first message?
Yes and no ;) (as always with programming)
The way the lib handles messages has changed allot. Its now more decoupled. The app/lib does not force the existence of queus and exchanges.
For you... It depents on your use-case, but for a topic exchange u most likly will because u devops this from a rabbitmq point of view.
Your application should not controle the messages. Your application just sends the message and does not know in which endpoint/queue your message land's.
Workers just work queues and publishers just publish ;)
If u want some sort of control (from within your app) u should specify commands/crons to specify the exchanges and queues upfront or on startup off your app.
Probably because your jobs dont specify the queue/topic. Your message is going to the default queue or topic. But because there are no endpoints (queue's) the exxhange disgards the message.
You publish agaist an exchange. The published message must contain its destination. Queues must be bound as endpoints to an exchange.
Read also tje manual of RabbitMQ. More wil be clear how rabbitMQ handles things
Thank you for your answer.
Here is my version
Here is my config
Here is my code
IndexController:
SecondRabbitQueue:
Question:
When I run the above code, there is nothing to get data