I´m using Firebase to get a list of messages. The problem is that I only need to see messages sent after I opened the page. Basically I don´t need to store the messages in the d
The Firebase Database is not a message-passing mechanism, it is a state synchronization mechanism. If you want you can emulate a message passing mechanism on the database, but you'll have to do the work for that.
One way to accomplish this is to write the message for each device that you want to send it to. That means that every device can simply delete each message that it reads and your database will never be bigger than the total number of unread message-devices.
Another way is to store each message only once, but then track what devices have read it. Once every device has read it, you can delete the message. You'll need to store the "what devices have read each message" and the "list of all devices" in the database. This approach may require less storage, but it will definitely be more complex in code.