How to combine data from two sources api sockets?

There are API on the socket. One socket gives data for the month, second for second. I need to take this data and distribute them to your customers. So I thought.
1.Or to write data per second to its database and then distribute.
2. Do not write to the database and immediately send the data on its customers. But how? Can't figure out the algorithm. We have to somehow give data for the month and then connecting the user to the second data transmission. How to organize it better?
I would appreciate any thoughts and advice.
April 7th 20 at 10:40
1 answer
April 7th 20 at 10:42
Solution
well as the classic FIFO
demon channels and all that, but maybe in your base less connections will need

Find more questions by tags Sockets