#Specify a DB connection (2 different mysql connections) when dispatching a job.

1 messages · Page 1 of 1 (latest)

pure elbow
#

I have 2 db connections (mysql1, and mysql2). I have my application connected to both. Now i know that i can specify the QUEUE_CONNECTION to database but i want to specify "which database". Any1 tried this earlier ?

boreal osprey
#

@pure elbow Queue connections don’t have anything to do with database connections.

#

Your models should be defining what database connection they need.

pure elbow
#

Yes - its something like a bridge between an old system and the new one thus wanted to be able to consume data from the old database (mysql1), process it and add tasks to jobs table in mysql2 connection, because the new system will have only single connection (to mysql2)

#

Now that i think of that - think that messaging system would work better here instead of doing this ;]