Imagine a (HipChat-like) chat application, featuring private and multi-user chats, offline messages, status tracking, history search and so on. The frontend will be JavaScript application using WebSockets; the backend is going to be JavaEE7-based. With the above, do you think it's a good idea to use JMS for internal processing, with each peer being a JMS client, chatroom being JMS topic etc.? I suppose that it will let us not reinvent the wheel by delegating multiple functions to JMS (asynchronous broadcasts, message archiving, offline message storage and delivery, etc.)
On the other hand, JMS is more about integration, asynchrony and loose coupling between components. Do you think it will suit the needs of a chat service?
P.S. It is a requirement that the application does NOT use external infrastructure like Jabber/XMPP.