Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0-M1
-
None
Description
According to the smack documentation if you register the same listener multiple times, only the most recent filter is used.
Since the XmppConsumer is being used for all listeners in this case only the last add<Message|Packet>Listener call is honored.
It would be wiser to have the listeners as separate classes, then the handling of each packet/message type can be addressed separately.
A ConnectionListener can be added as well to handle connections that go down and can be retried later.
Proposed listeners:
ConnectionListener (to listen to and respond to connection and disconnection events)
MessageListener (to listen to and process messages)
RosterListener (to listen to and process roster events)
PresenceListeners (should be one for most types of listener defined in org.jivesoftware.smack.packet)
Each listener type should be able to pass messages up through the camel exchange. All except the MessageListener should be disabled by default, but enabled via an option in the uri passed to camel. MessageListener should always pass the message up through the camel exchange.
Attachments
Issue Links
- depends upon
-
CAMEL-2480 Use mock XMPP server for unit tests
- Resolved