Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

auto destroy rooms and session close server2server event


Level 3


I've read somewhere that the room session ends automatically few minutes after the last user leaves.

Is it possible to destroy the room automatically when the room session ends?

Is there hook for when the room session is ended?

I've found this doc about hooks:


Is there a list about available events or is it just the collections I can see in the room console?


1 Reply


Former Community Member

Hi there,

Yup, our wiki is in need of some updating - we're going to be doing so in
the next couple of weeks.

  If you check the server integration libraries in the SDK,
AccountManager.createRoom now has a new parameter, "deleteOnExit". Set it to
true, and once your last user leaves the room and 5 minutes goes by, the
room deletes itself.

  As for hooks, we've been planning to update to show more of the manager
nodes. You should be able to listen to collection "RoomManager", and see the
"roomState" node retract an item with body "active", which indicates the
room is shutting down.

In the future, we're going to make it a little easier to navigate the
manager classes (not this release but some release down the line) - for now
we've been waiting to determine demand for this feature. You would be the
2nd person to ask, so one more ask, and it makes it on our list =).