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
2 answers
Symfony messenger - serialize objects inside message
Hi I have applications that is dispatching commands(messages) to Amazon SQS queues. I have working environment and my commands are in the queue, but in the wrong format like this:
{
"Messages": [
{
"MessageId":…

Eddy
- 593
- 8
- 22
0
votes
1 answer
Can't publish RabbitMQ message to queue with own name
I would like to publish a rabbitMQ message to a queue with this name: "vincent.test.rabbitMq". Im trying to do that with the Symfony-messenger.
This is my Message:
class TestMessage
{
private string $value;
/**
* @param string $value
…

Grontourismo
- 46
- 7
0
votes
1 answer
AMQPS Symfony Messenger and Heroku
I’m using CloudAMQP though Heroku’s add-on (https://elements.heroku.com/addons/cloudamqp) with the « Little Lemur » plan.
I’m building a PHP Symfony application and I want to connect to AMQP through SSL but it says in the documentation that :
If…

Maxime Picard
- 603
- 5
- 17
0
votes
1 answer
Symfony 5.3: Async emails sent immediately
Edit: This question arose in the attempt to have both synchronous and synchronous emails in the same application. That was not made clear. As of this writing it is not possible, at least not as simply as tried here. See comments by @msg below.
An…

geoB
- 4,578
- 5
- 37
- 70
0
votes
0 answers
Symfony Messenger Redis Priorities transports
I have a symfony project wrapped in docker and a Redis queue configured.
Configurations:
messenger.yaml
parameters:
env(CONSUMER_ID): '0'
framework:
messenger:
# Uncomment this (and the failed transport below) to send failed…

Artem Sityaev
- 1
- 1
0
votes
1 answer
Messenger worker idles / does not 'work' in Symfony 4 test
I'm trying to test my process of handling some data via messenger in Symfony.
I try the following:
At first, I define my worker.
$event_dispatcher = $this->getContainer()->get(EventDispatcherInterface::class);
$logger =…

Jorn Barkhof
- 264
- 1
- 16
0
votes
1 answer
symfony messenger multiple bus
I need to have multiple bus in my application written on Symfony. To do so I'm using messenger bundle.
So I need to have:
external_events_bus - which receiving messages from external systems, which using sqs transport
application_events_bus - for…

Bogdan Dubyk
- 4,756
- 7
- 30
- 67
0
votes
2 answers
Symfony Messenger consumer pool
I'm not sure this is something possible: to have a pool of messenger consumers for the same queue ?
I've tried to use the Redis consumer= options but that's not it.
Maybe a "pool" middleware could do some routing to specific transports?

quazardous
- 846
- 10
- 15
0
votes
0 answers
How can i config properly RabbitMQ, messenger and amqp on symfony 5.2 without use docker_compose.yml?
I want to submit a form with async method using messenger component and rabbitmq. After submitting this form, an email is sent to me. But when i implement rabbitmq it does not work. I have surely a problem with configuration. Maybe i have to add…

kevin13005
- 1
- 1
- 3
0
votes
1 answer
Doctrine middleware do not make flush
My config/messanger.yaml looks like:
framework:
messenger:
default_bus: command.bus
buses:
command.bus:
middleware: 'Symfony\Bridge\Doctrine\Messenger\DoctrineTransactionMiddleware'
…

miclofa
- 49
- 1
- 10
0
votes
0 answers
Symfony messages not handled despite handler is shown in debbuger
so as title says, my message in Symfony is not handled. not at all. not even an error comes out.
so my messenger config is totally default. however I set multiple buses like it is showen below
services:
# default configuration for services in…

adeptofvoltron
- 369
- 1
- 9
0
votes
0 answers
Symfony Amqp Messenger "Call to a Member function get() null"
My controller
$arr = array(
"key1",
"key2",
"key3"
);
foreach ($arr as $key) {
$this->bus->dispatch(new HubspotMessage($key));
}
My Message Handler
$key = $hubspotMessage->getKey();
$selectedEntity =…

Cagrison
- 150
- 3
- 13
0
votes
1 answer
Symfony messenger won't always restart
I'm currently working on a Symfony 4 application which use Symfony Messenger to handle some background jobs with a dedicated worker.
I run the worker using systemd v241 with the following configuration:
[Unit]
Description=Symfony…

Awea
- 3,163
- 8
- 40
- 59
0
votes
0 answers
Under Symfony, the locale seems to change without explanation
I have a Symfony 4 application in which I generate a PDF file using dompdf. In my twig files, I use localizeddate to display a date. I want my date to be written in French.
Date :
{{ myCustomDate | localizeddate('long', 'none')…

darckcrystale
- 1,582
- 2
- 18
- 40
0
votes
0 answers
What is wrong with my SuluSyliusConsumerBundle configuration?
I have a Sulu and a Sylius application which I am trying to integrate using the SuluSyliusBundle and RabbitMQ. I have added the following configs...
messenger.yaml
framework:
router:
resource:…

True Saint
- 41
- 6