Large number of messages in Node JS

My requirement is simple, I need to get messages from clients, store them in the server and send the collected messages to all client. To make it simple,

n Clients send messages to server. After all clients have sent messages, server sends back the entire list of messages to all clients.

Each message itself is small, (about 50 Bytes). What is the easiest way to accomplish this? Would using an array be optimal? Or a database?

The number of clients is of the order of 4000.

Thank you. Please ask if you need any more details.

I solved it on my own. I ended up using the NoSQL Redis DB for high speed.