Messenger component provides a message bus with the ability to send messages and then handle them immediately in your Symfony application or send them through transports (e.g. queues) to be handled later.
Questions tagged [symfony-messenger]
121 questions
0
votes
1 answer
Api-platform - docker. What is the best way to consume messenger buses from then a containerized service?
I'm interested to know your opinions.
By working from the api platform stack (https://github.com/api-platform/api-platform),
I want to minimize manual intervention on the deployment of my project
I added a rabbitmq container ...
version:…

Jonathan Morel
- 21
- 3
0
votes
0 answers
Why does Symfony debug:messenger command show my messenger handler twice when I use AsMessageHandler attribute?
My Symfony 6.2 bundle has an handler like the following
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
#[AsMessageHandler]
class MyHandler {
public function __invoke(MyMessage $message): void {
}
}
When I run the bin/command…

FabioFLX
- 31
- 7
0
votes
0 answers
How to debug the PDOException "There is already an active transaction"?
I have Symfony Messenger on Symfony 4.4.
The handler works with a Microsoft SQL Server 2019 (RTM-CU2) (KB4536075) - 15.0.4013.40 (X64). The connection to this db is done with a php custom library that just wraps PDO using FreeTDS 7.1.…

nulll
- 1,465
- 1
- 17
- 28
0
votes
0 answers
Symfony messenger + RabbitMQ on a Kubernetes cluster : performance issue
Let me first introduce the cluster :
3 nodes ( 8 core + 30Gi each)
Volume working as ReadWriteMany with a nfs controler
Deployment kube PHPFPM : dispatch symfony messages
CRD Rabbitmq for handling the queue
CRD Postgres (1 replica, 3 cores +…
0
votes
0 answers
Symfony Messenger with RabbitMQ JsonSerialize problem with requeue
I have created 2 queues in Rabbit. First if main, second should be used when Exception is thrown in consumer. On older Symfony with ampq bundle is all ok, but in 6.2 with Messenger not. There is problem with JsonSerializer. I "copy/paste" solution…

Darius Radius
- 169
- 3
- 14
0
votes
0 answers
How to get symfony messenger Messages before handler consumes them?
I wonder how to get messages which are waiting in my Failed queue from a controller, before the handler consume them.
I don't persist them with doctrine, I put them in a rabbitmq that I can see them from the rabbit admin interface.

L01C
- 578
- 1
- 8
- 25
0
votes
0 answers
Symfony Messenger Cache & AWS Redis Cluster
I am using AWS Redis Cluster with Symfony 5.4 https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html. The main use is to have common point for the Symfony Messenger workers running in Kubernetes.
Here is the cache.yaml…

Nicolás González
- 121
- 12
0
votes
3 answers
Symfony Messenger Injection Doctrine
I need help for my project.
I try to inject Entity Manager inside my service (SendInBlueService) call with messenger, but DependencyInjection can't find doctrine.orm.entity_manager.
My test route
#[Route('api/testSendInBlue', name:…

JeremK
- 11
- 3
0
votes
1 answer
Symfony 6 - stop and start Message Messenger systemd worker as www-data user via PHP
I am currently working on a Symfony 6 project. Now I have the situation that I want to stop and start a systemd service which is used to consume the messages from the Symfony Messenger message queue.
The service is called "messenger-worker@.service"…

schwaluck
- 115
- 9
0
votes
0 answers
Handle save hooks in Symfony messenger with abstract base class
Quite new to Symfony Messenger but experimenting with it. If I have something like this:
abstract class AbstractEditPage implements MessageSubscriberInterface
{
public static function getHandledMessages(): iterable
{
return [
…

Mark G
- 85
- 1
- 5
0
votes
0 answers
Symfony Message is received but not handled by registered handlers
I am trying to dispatch a message when a person visits any page on the Shopware 6.4 shop. With the messenger:consume -vv command open in the terminal, I see that the message is received when I visit the page, but it simultaneously gives the message…

Huzaifa Mustafa
- 262
- 5
- 18
0
votes
0 answers
Symfony messenger message lost after running out of memory
I'm creating an application in Symfony, and I need to retrieve a large number of customer records (tens of thousands) from an external API endpoint, then store it in a Doctrine database. The API will only return 100 results at a time, so it's…

ReeceNG
- 1
- 1
0
votes
1 answer
Symfony Messenger sequential message processing and the x-single-active-consumer argument on RabbitMQ
I use Symfony Messenger with the RabbitMQ adapter in my application. The logic of the application is that messages from the same queue must be executed sequentially, one after the other (the order is not important), even if the queue is listened to…

WindBridges
- 693
- 2
- 11
- 23
0
votes
0 answers
Symfony Messenger - working with multiple schemas
Background
I am working with multiple postgres schemas that basically identify as individual tenants sharing the app. Every request that the backend receives contains an instance identifying header which allows us to set the schema for each…

Luke
- 555
- 1
- 5
- 23
0
votes
1 answer
Inject dependencies into symfony messenger callable handler using Messenger as an independent component
Reading this manual https://symfony.com/doc/current/components/messenger.html#installation
I'm trying to integrate Messenger to Slim-based project
Manual handler registration is as simple as callable creation
The only thing I can't get is how to…

Alexandr
- 11
- 1