[Symfony][4.3] Multienviroment support
Closed this issue · 0 comments
psociety commented
Hi!
I'm using enqueue-dev + messenger-enqueue-transport in symfony with beanstalk, where i have multiple enviroments (.env).
How should i setup so jobs from different enviroments don't get mixed in the same queue?
I run the jobs of each enviroment using:
APP_ENV=qa bin/console messenger:consume beanstalk -vvv
APP_ENV=production bin/console messenger:consume beanstalk -vvv
When i was using pheanstalk i just added a suffix on jobs name, but in symfony jobs are set using classes:
$message = new ReportMessage($reportUrl);
$this->bus->dispatch((new Envelope($message))->with(new DelayStamp(1000)));
(my old implementation):
$this->pheanstalk->useTube(JOB_REPORT_MESSAGE . APP_ENV)->put(json_encode($data));