Auto delete rooms

Is there a way to auto remove all rooms older than 24 hours?
I think our Janus server now has thousands of rooms.

Kind regards,
Jesse

I don’t think so, our solution to this is to have an “agent” program deployed next to each Janus instance on the same machine, which regularly talks to it’s API and reaps unused rooms.

Hello Jonathan, do you have an example for this solution?

An alternative that works for us is the following: to keep the session active, you probably created an interval that sends the “keepalive” message. In this interval, you can search for the list of participants in the room “listparticipants”. If the room has no participants (publishers), the room can be destroyed.

A simple way to keep the editors clean is by using the “hangup” event, which is generated whenever a peer is disconnected. This event has sessionId and handleId information for this peer.