Hello fellow Laravel devs
I'm experiencing a pretty weird issue. I have a job called AnalyticsEventProcessingJob which accepts a $uuid string parameter. This job is dispatched from within a Kafka listener function.
The listener function captures incoming Kafka messages into an array , and when 10.000 messages have been received it writes some data to a database and then dispatches the job like this :
AnalyticsEventProcessingJob::dispatch($this->batchId)->onQueue('email_event_tracking');
I see the data being inserted in the database fine, but the job is never dispatched onto Horizon.
However, when I create a testroute :
Route::get('analyticseventjob','App\Http\Controllers\ApiController@analyticseventjob');
which does exactly the same dispatch command, it works fine when the route is called.
I don't get any exceptions/errors, it's simply as if this code in the listener just doesn't do anything.
Any suggestions on where I could start debugging/finetuning this ?
PS the Laravel app is deployed on HashiCorp/Nomad