Using a queuing system to do custom logic

47 views Asked by At

I am developing a notification engine, this notification engine will send several types of notifications to several receivers.

  1. Email Notification
  2. Push Notification
  3. ...

When a certain client communicates with the notification engine in order to send a notification, the engine must store this notification in a certain queue, before communicating with the receiver.

I have a requirement that the flow should be as the below:

  1. Then notification engine must check if the receiver is able to send notifications now.
  2. If the receiver can send notifications, the message will be sent to it
  3. If the receiver cannot send notifications, the message must stay in the queue, and then try to be processed later.

For example, if I am sending an email notification, the Email receiver is running but the SMTP server is not accessible, so the receiver will not be able to send the email notification. The notification should stay in the queue, and will be processed later.

I know that there are several queuing systems that I may use like MSMQ and RabbitMQ.

What are the best practices that I can use in order to develop my logic and fulfill the requirements?

0

There are 0 answers