You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
08:14:06 INFO [messenger] Received message Symfony\Component\Messenger\Message\RedispatchMessage ["class" => "Symfony\Component\Messenger\Message\RedispatchMessage"]
CALLLLLLLLLLLLLLLLLLLLED
08:14:06 INFO [messenger] Message AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies handled by AppBundle\NotificationCenter\Messenger\MessageHandler\CheckTrafficAnomaliesHandler::__invoke ["class" => "AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies","handler" => "AppBundle\NotificationCenter\Messenger\MessageHandler\CheckTrafficAnomaliesHandler::__invoke"]
08:14:06 INFO [messenger] Message Symfony\Component\Messenger\Message\RedispatchMessage handled by Symfony\Component\Messenger\Handler\RedispatchMessageHandler::__invoke ["class" => "Symfony\Component\Messenger\Message\RedispatchMessage","handler" => "Symfony\Component\Messenger\Handler\RedispatchMessageHandler::__invoke"]
08:14:06 INFO [messenger] Symfony\Component\Messenger\Message\RedispatchMessage was handled successfully (acknowledging to transport). ["class" => "Symfony\Component\Messenger\Message\RedispatchMessage","message_id" => null]
An finally we can specify a transport:
scheduler logs:
08:15:23 INFO [messenger] Received message Symfony\Component\Messenger\Message\RedispatchMessage ["class" => "Symfony\Component\Messenger\Message\RedispatchMessage"]
08:15:23 INFO [messenger] Sending message AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies with rabbitmq sender using Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransport ["class" => "AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies","alias" => "rabbitmq","sender" => "Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransport"]
08:15:23 INFO [messenger] Message Symfony\Component\Messenger\Message\RedispatchMessage handled by Symfony\Component\Messenger\Handler\RedispatchMessageHandler::__invoke ["class" => "Symfony\Component\Messenger\Message\RedispatchMessage","handler" => "Symfony\Component\Messenger\Handler\RedispatchMessageHandler::__invoke"]
08:15:23 INFO [messenger] Symfony\Component\Messenger\Message\RedispatchMessage was handled successfully (acknowledging to transport). ["class" => "Symfony\Component\Messenger\Message\RedispatchMessage","message_id" => null]
In another worker (bin/console mes:con rabbitmq)
08:15:08 INFO [messenger] Received message AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies ["class" => "AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies"]
CALLLLLLLLLLLLLLLLLLLLED
08:15:08 INFO [messenger] Message AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies handled by AppBundle\NotificationCenter\Messenger\MessageHandler\CheckTrafficAnomaliesHandler::__invoke ["class" => "AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies","handler" => "AppBundle\NotificationCenter\Messenger\MessageHandler\CheckTrafficAnomaliesHandler::__invoke"]
08:15:08 INFO [messenger] AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies was handled successfully (acknowledging to transport). ["class" => "AppBundle\NotificationCenter\Messenger\Message\CheckTrafficAnomalies","message_id" => null]
There is something I don't like here. I must duplicate the configuration between messenger.yaml (routing), and the second argument rabbitmq of new RedispatchMessage().
I noticed that few years ago, but was too lazy to raise the issue.
But now I face a real problem with that.
Depending on where I deploy the application, I want to use another transport for this message.
So I added another "config_override.yaml" (highest priority) file in my app :
I personally would prefer if scheduler didn't dispatch messages synchronously and instead send them over to the configured transport (without the need of wrapping it in RedispatchMessage envelope).
I personally would prefer if scheduler didn't dispatch messages synchronously and instead send them over to the configured transport (without the need of wrapping it in RedispatchMessage envelope).
I personally would prefer if scheduler didn't dispatch messages synchronously and instead send them over to the configured transport (without the need of wrapping it in RedispatchMessage envelope).
Indeed, but that would be a BC break.
Right, would it make sense to have a global config option something like framework.scheduler.use_scheduler_transport with default as true to avoid BC break. Setting it false will dispatch the message over configured transport.
Description
see last chapter of: https://symfony.com/doc/current/scheduler.html#efficient-management-with-symfony-scheduler
By default the scheduler process the message synchronously:
scheduler logs:
We can tell it to dispatch the message to the bus, it's still synchronous
scheduler logs:
An finally we can specify a transport:
scheduler logs:
In another worker (
bin/console mes:con rabbitmq
)There is something I don't like here. I must duplicate the configuration between messenger.yaml (routing), and the second argument
rabbitmq
ofnew RedispatchMessage()
.I noticed that few years ago, but was too lazy to raise the issue.
But now I face a real problem with that.
Depending on where I deploy the application, I want to use another transport for this message.
So I added another "config_override.yaml" (highest priority) file in my app :
But it doesn't work since the transport is hardcoded is hardcoded.
So I propose the following
null
) we use the transport configured in the configurationtrue
to use the defaultWDYT?
Example
No response
The text was updated successfully, but these errors were encountered: