sendportal-core icon indicating copy to clipboard operation
sendportal-core copied to clipboard

Issue with Event Listener Not Firing

Open HeadStudios opened this issue 10 months ago • 0 comments

Hi SendPortal!

I'm encountering an issue with the event-listener flow in my application.

Details:

I've confirmed that the MessageDispatchEvent is being dispatched. I have added a dump statement within the constructor of this event, and I see the expected output. I have also ensured that this event is linked to the MessageDispatchHandler listener in the EventServiceProvider. When the event is dispatched, I expect the handle method in the MessageDispatchHandler to execute. However, it seems this method is not being called, even though the listener's constructor is. I've also noticed that the MessageDispatchHandler is queued (implements ShouldQueue). While the constructor is being executed, the queued handle method seems to be the part not working.

What I've tried:

  1. Checked to ensure the queue worker is running and processing jobs.
  2. Checked for any failed jobs using php artisan queue:failed.
  3. Checked the application logs for any potential errors related to this flow.
  4. I'm not sure why the handle method inside the listener is not being executed after the event is dispatched. Any guidance or assistance would be much appreciated.

Thank you for your support.

HeadStudios avatar Aug 17 '23 02:08 HeadStudios