Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-1698

Break out the smack listeners implemented by XmppConsumer out to separate classes, and add a ConnectionListener.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0-M1
    • Future
    • camel-xmpp
    • 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

          Activity

            People

              davsclaus Claus Ibsen
              edward.campbell Edward Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: