First, how can i create a group of rooms at runtime as a client ?
Because currently i suppose that there is a kind of array in which are add freshly created group of rooms
Then when a room is created, this one can be registered in an existing and available group of rooms
After some research i know that group of rooms are just a unique string ID and we can subscribe / unsubscribe rooms to group of rooms
Room groups are not supposed to be create dynamically from client side.
You can from server side, however, by simply creating a Room with a new groupId.
In general groups are not meant to be dynamic because your application should already "know" which categories of Room there will be. This is not mandatory and groups can be added at runtime, but that's the general idea.
Is a basic room type can have spectator ?
I know that game room can have.
No. As you said game Rooms have that feature. Game Rooms are not restricted to hosting games, you can use them for whatever other activity you have in mind that requires spectators.
I need when a client is joining a room be not able to send public message but only receive public message. SO is the spectator concept can be a solution ?
i mean when a spectator is joining a room, is this one can't be able to send message but only receive it in the concerned room ?
This is not clear.
Can you explain what do you mean by "When a client is joining a Room"? You mean before he's chosen a Room to join? If he's supposed to receive Public messages he must already be in another Room. Public messages work only inside Rooms.
Explain the flow, please.