Questions tagged [symfony-messenger]

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.

121 questions
1
vote
1 answer

Switch sendmail Parameters in symfony/mailer when using symfony/messenger

The local Development Machine uses msmtp for sending Mails, which works fine. BUT it does not accept /usr/sbin/sendmail -bs, it only works with /usr/sbin/sendmail -t. I can see that I could change this when using other parameters for the…
user1512255
1
vote
1 answer

Symfony Messenger: retry delay not working with Redis transport

I have a Symfony 4 application using the Symfony Messenger component (version 4.3.2) to dispatch messages. For asynchronous message handling some Redis transports are configured and they work fine. But then I decided that one of them should retry a…
igneus
  • 963
  • 10
  • 25
1
vote
1 answer

Symfony 5 Messenger not auto configuring message handler

I am new to Symfony framework and am trying to set up a project with Messenger (https://symfony.com/doc/current/messenger.html). My understanding is after setting up the handler class with “implements MessageHandlerInterface” the handler should be…
user1404617
  • 585
  • 1
  • 5
  • 20
1
vote
0 answers

Why can't I directly invoke an instantiated class in a test?

I am using Symfony Messenger and I want to do an integration test on MyHandler. This is how I proceed and it works very well: protected function setUp() { $this->handler = new MyHandler() } public function testMyHandler() { $message = new…
EtienneG
  • 300
  • 5
  • 14
1
vote
1 answer

How does Symfony Messenger determine which handler should handle each type of message?

I am trying to implement exchanges in rabbit and Symfony, using the Messenger component. Let's say we've got a transport: messenger: transports: amqp_image_resize: dsn: '%env(MESSENGER_TRANSPORT_DSN)%' options: …
Maad
  • 211
  • 2
  • 8
1
vote
1 answer

How to best run Symfony Messenger Worker on Kubernetes

What's the best way to run the messenger:consume task on Kubernetes? Deployment? If we do it with a deployment with a certain number of replicas this could work, but what if we do a rolling update of the deployment which then results in a pod to be…
Kim
  • 1,757
  • 1
  • 17
  • 32
0
votes
1 answer

retrying messenger message from a Symfony controller

I need to retry a specific failed messenger message from a Symfony controller. When I try to retrieve failed messages by $this->failedTransport->get(); all messages are cleared which is not what I want. I cannot use…
brnina
  • 27
  • 1
  • 4
0
votes
0 answers

symfony messanger count jobs

im ussing symfony messanger wiith doctrine handler. I start job example 100 tasks - 100 messages. When it start user get page with progress. Problem is that when user open page - in same time queue start work so somethink happen that when hi open…
Developer
  • 2,731
  • 2
  • 41
  • 71
0
votes
0 answers

Unable to send dkim signed templated email via messenger async in Symfony 6.2

I'm going to run production project but still cannot resolve a problem with sending signed templated email. I've googled and there are a few people with the same problem without clear answer. I believe that problem is related with Event. But don't…
Pavel
  • 1
  • 1
0
votes
0 answers

Symfony Messenger component and redis transport: messages are processed on all queues

I have 4 message queues that use Redis as transport and are each fired in their respective worker (via Supervisor), but every time a message lands in one of the queues, it gets processed in all of them. The documentation is clear in this regard, it…
Francisco
  • 194
  • 2
  • 9
0
votes
0 answers

Symfony messenger failed messages with extra information/flags

I've been searching around for a possibility to flag or add additional information to Symfony Messenger message if it fails. For example: If a message fails to finish completely, I would like to add a flag to the message like emailSent = true so if…
Kirdeika
  • 237
  • 2
  • 3
  • 12
0
votes
0 answers

Symfony Messages are not sent to failure transport

I'm working with Symfony Messenger (Symfony 5.4), trying to use an async transport with multiple retries. As a fallback I would like to use a failure transport. My Messenger configuration is: framework: messenger: reset_on_message: true …
arsrobota
  • 15
  • 6
0
votes
0 answers

Retry failed messages of a Symfony app without the command line

I have a Symfony 6.2 application that uses the messenger component to handle asynchronous messages. The docs talk about several commands to handle failed messages (messenger:failed:show / messenger:failed:retry / messenger:failed:remove). However,…
Victor T.
  • 115
  • 1
  • 9
0
votes
0 answers

Get the max retries for a message in the Middleware of Messenger Component in Symfony

I need to fetch the max retries from the retry strategy of the queue, where my message is processed. If I have an example configuration: framework: messenger: default_bus: messenger.bus.default transports: async: dsn: '%env(DNS)%' …
Mutatos
  • 1,675
  • 4
  • 25
  • 55
0
votes
1 answer

What Symfony ValidationMiddleware really do?

I'm trying to understand what Symfony ValidationMiddleware do when it is enabled. Validate what and how and when? I didn't see any difference in my app when it's enabled or disabled. Except performance. Validating messages takes a really long time.…
deoomen
  • 153
  • 11
1 2 3
8 9