Well, it depends. If your listener itself is doing a heavy task you could queue them as well. If your listener is only performing the notification you might not have to queue it. You can also queue both, so the listener and the notification. Like I said it depends on how heavy the task is and what your needs are ;)
Should I queue listener or notifications?
Currently I am firing an event on while updating a model using listener and the event is being listened by many listeners. Inside listener I am sending notifications to multiple users via multiple channels. Right now I am queuing the notifications only. Is it a good approach? Considering that I want the update process to be completed successfully even the notifications failed to send or some sort of exception occurred in notifications.
make sure you @mention someone if you update your question and want a followup
Will there be a delay? It depends how backlogged your queue is .
If you are running at 500 jobs on your queue and it takes 3 minutes to get to your queued listener then a notification is created but goes to the back of the queue, by which time there may be a further 500 jobs queued, and another 3 minute delay.
The numbers are just examples of course
Please or to participate in this conversation.