XMPP vs JMS as a message carrier
I'm considering using either XMPP or JMS as the transport for exchanging messages between software agents. (I'm working with the JADE agent system.)
The main problem I need to solve is to be able to send or deliver messages from/to agents whic开发者_开发问答h may be behind firewalls. Is there any reason to consider XMPP or JMS superior for that purpose?
We do operate some JMS communication through firewalls. The settings of the firewall are depending on your JMS provider, as JMS is not a "wire protocol" but an API. There may be JMS implementations that are hard to manage through a firewall. We used JBOSS MQ and SonicMQ and found it very unproblematic: Both require only a small set of ports to be opened.
One issue that you should keep track on is the behaviour when there is no message traffic: most implementations do not exchange network data as long as no message is sent, most firewalls do have some timeout on a connection. This may lead to connections getting dropped by the firewall. The workaround that we are using here is to recreate the connection once in a while.
精彩评论