For community information!
I already implemented chatting system by using libjingle and openfire.
(1)support server side clustering based on the free openfire. So the system can support millions of concurrent users.
(2)client side messaging api based on libjingle (include person-to-person chat, multiple user chatting (both anonymous and persistent MUC).