The documents says it will create a multi user chat. But if the groupaddress is an existed group, will I join the group or create a new one?
'join()' joins a groupchat. Sometimes, depending on the server, this also means creating it if it doesn't already exist.
Smack 4 has createOrJoin() which will create a groupchat if it doesn't exists or otherwise join.
I think the messasgelistener is a thread.
No it's not. But there is a Thread that invokes the matching message listeners.
Are the both threads running now or only the latest one?
It depends on the MUC if both message listeners will be invoked or not.
How can I join more than one rooms and addmessagelistener?
Create a new muc instance
MUC muc2 = new MultiUserChat(…)