V
V
Vasyl Fomin2019-11-10 21:49:24
Laravel
Vasyl Fomin, 2019-11-10 21:49:24

Listener or Notification to throw in queue?

Hello!
I need advice on how to implement the following architecture more correctly using Laravel and its queues:
There are users who need to send notifications (for example, via sms / push) when a certain event is added (for example, adding news). Added an Event (when saving the news) to which the Listener is subscribed. In the Listener, in turn, in a cycle through the list of users, Notification is called, in which we send a notification to the user.
The question is, what to put in the queue? Listener or Notification? If both? That it should be separate queues (not default)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2019-11-10
@fomvasss

The question is, what to put in the queue? Listener or Notification?
Both.
That it should be separate queues (not default)?
There may be separate, maybe one, you decide based on the number of tasks and the conditions for their work - timeouts, the number of required workers, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question