Using both a message queue and a database

I will develop a system that will include a data collection server, where each acquisition will fill in a line. I should also be able to inform the user app about when the new data was received.

From what I read, it is not recommended to use the database as a message queue and vice versa, but I was wondering if I can use both of these words:

The receiving application can add a new row to the database and then notify listeners in the messaging system. Would this be the best approach for this type of system? Would it be too hard? Is there a design template that already implements this?

+4
source share
1 answer

Yes, inserting a row into the database and updating the GUI are two different operations that need to be separated.

What you offer sounds good:

  • insert a row in the database
  • notify the user’s application through the notification mechanism (listeners will do their best).
+2
source

Source: https://habr.com/ru/post/1307715/


All Articles