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
4
votes
2 answers
Error: Serialization for the format json is not supported
I have integrated symfony messenger bundle and i am trying to encode that message .
It was working in Symfony 3.4.4 version . However it is giving above error in Symfony 3.4.28 version.
I have traced in symfony serialzer component , it seems that…

Madhuri Mane
- 41
- 1
- 3
4
votes
2 answers
How to test that Symfony Messenger events are dispatched in a multi bus scenario using Behat?
Seems difficult and there isn't much documentation around this (I'm using FirendsOfBehat Symfony extension). I want to test whether Transport carries any events by using get() method but I'm not getting any results. It feels like its not routing the…

db306
- 934
- 11
- 22
4
votes
0 answers
Symfony Worker - Consume Messages - EntityManager
I use Symfony 4 with messenger and I use a worker who consumes my messages as a long-running process.
I have a bug with doctrine if I delete my post and recreate a new one and I dispatch my message. $post have the old data and not the new one.
I…

Spawnrad
- 445
- 6
- 18
3
votes
0 answers
Symfony 6 - Creating excel with PHPSpreadsheet and downloading it asynchronously
I'm stuck on something, and it seems internet haven't had this problem (or i haven't got the right keyword to find the answer)
Keep in mind that I'm still learning Symfony 6 and I'm a bit by myself for now ... So I'm open if you tell me that…

Corentin Durey
- 51
- 2
- 6
3
votes
1 answer
Message not dispatched async despite configuring the handler route to be async in Symfony Messenger
I'm working with Symfony 4.4 and Symfony Messenger
Messenger configuration includes a transport and routing:
messenger:
failure_transport: failed
transports:
async_medium:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
…

Florin Popescu
- 33
- 3
3
votes
0 answers
Symfony messages body encoding
Iorder to send mails etc, we use messages in our project. If a message fails (cause of an error in the code of the message handler) it'll be stored in messenger_messages table.
The messenger_messages table contains a column called body. This is a…

Joshua Bakker
- 2,288
- 3
- 30
- 63
3
votes
0 answers
Symfony messenger listen for even sent to failure transport/queue
short background, in application we using doctrine transport for failed queues, so if message failed (all retries failed) messenger storing it to failed messages table and it's waiting for further actions. And I need somehow listen when message is…

Bogdan Dubyk
- 4,756
- 7
- 30
- 67
3
votes
0 answers
How can i use Symfony Messenger without messenger.yml?
I'm trying to use Symfony Messenger in my project without Symfony Framework.
class MessengerCommandBus implements CommandBusInterface
{
/**
* @var MessageBusInterface
*/
private MessageBusInterface $commandBus;
public function…

Slip
- 939
- 6
- 17
- 40
3
votes
0 answers
Can you define a consumer command that only consumes a specific queue of a multi-queue transport?
I have the impression to miss something while implementing AMQP services with RabbitMQ and Symfony Messenger.
From a RabbitMQ perspective, consumers (also known as workers) consume from queues.
From the Symfony Messenger documentation, one…

David
- 2,603
- 4
- 18
- 28
3
votes
1 answer
How to prevent message to be sent to the failure transport?
Is there a possibility to prevent that certain messages (e.g. those implementing a certain interface) are sent to the failure transport after being rejected (after multiple retries)?

Mark Watney
- 123
- 1
- 16
3
votes
0 answers
Separation of transactions between two different buses in symfony messenger when error occurs in the first one
Let's say we have the following code:
try {
$message = new CreateSomething($data);
$this->messageBus->dispatch($message);
} catch (RuntimeException $exception) {
$failNotification = new CreateFailedNotification($data);
…

Michal S.
- 450
- 3
- 15
3
votes
1 answer
How to avoid handling messages from "child" classes in Symfony Messenger?
I guess I'm missing something in the documentation, but the question is pretty simple.
Let's say I have a message of class MessageOne and MessageTwo which extends MessageOne.
I also have MessageOneHandler which should handle…

Gino Pane
- 4,740
- 5
- 31
- 46
3
votes
1 answer
Symfony MessageHandler count how many times a message has been dispatched
I'm using Symfony Messenger and I want to keep dispatching a message in the handler until it has been dispatched a number of times.
How can I keep track of that?
This is the code of my handler class so far:
class RetryTestHandler implements…

johnny
- 135
- 2
- 4
- 12
3
votes
0 answers
No transport supports the given Messenger DSN doctrine
I am getting an error No transport supports the given Messenger DSN "doctrine://default" when executing command messenger:setup-transports for Symfony messenger.
Handling messages synchronously for the message, handler, and dispatcher…

sushant
- 87
- 7
3
votes
1 answer
No transport supports the given Messenger DSN
When trying to configure symfony messenger always getting error No transport supports the given Messenger DSN "doctrine://default".
symfony framework: 4.3.4
messenger: 4.3.0
In this application only doctrine-bundle & symfony-messenger is…

EdvinasPocius
- 173
- 2
- 10