How to make a XMPP client in a container like tomc

2019-09-11 00:27发布

I need to login, receive and send some messages over XMMP with a servlet loaded on tomcat container.

I would like to know if there is any implementation already of this situation ?

thx for ur time :)

2条回答
女痞
2楼-- · 2019-09-11 00:38

I've found smack to be the best available java library for XMPP. It is however, far from perfect for server side development.

In particular you need to think about your clustering early as smack connections hold alot of state.

The api itself is very nice however, it's pretty trivial to connect and send messages and the documentation is decent. check it out http://www.igniterealtime.org/projects/smack/

查看更多
乱世女痞
3楼-- · 2019-09-11 00:45

You can use Smack library or Mule ESB XMPP transport built on top of it. Whether it is a servlet or standalone application doesn't matter (at least when you are a client).

查看更多
登录 后发表回答