Answer the question
In order to leave comments, you need to log in
How to use Symfony\Messenger without a framework?
I found an article https://medium.com/@dimitri.gritsajuk/symfony-mess...
But it's probably already out of date. I installed all the components but without the framework itself. symfony/dependency-injection symfony/config symfony/messenger symfony/amqp-messenger symfony/serializer symfony/yaml and others.
The container service is running. But when I call $this->messageBus->dispatch(new Message($var)); - Nothing happens. Returns an empty envelope. It seems to work, but no errors occur. I still don't understand how to fix this.
Answer the question
In order to leave comments, you need to log in
The article describes everything correctly. There,
* Container->addCompilerPass(new MessengerPass()); is added to the container.
I just forgot to call the container compilation
* Container->compile();
Here, I wrote an article on this topic on Habré.
Everything is described in detail there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question