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

Use exceptionHandler on Xmpp Consumer

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • camel-xmpp
    • None
    • Novice

    Description

      Hi!

      What do you think about adding a call to the exceptionHandler in the doStart() method of XmppConsumer class ?

      It would looks like :

      try

      { connection = endpoint.createConnection(); }

      catch (XMPPException e) {
      if (endpoint.isTestConnectionOnStartup())

      { throw new RuntimeException("Could not connect to XMPP server.", e); }

      else

      { final String xmppExceptionLogMessage = XmppEndpoint.getXmppExceptionLogMessage(e); LOG.warn(xmppExceptionLogMessage); getExceptionHandler().handleException(xmppExceptionLogMessage,e); scheduleDelayedStart(); return; }

      }

      This allowed an exceptionHandler to be notified of failure connection.
      The testConnectionOnStartup doesn't call exceptionHandler because the exception is thrown while starting the consumer.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            tiboun bounkong khamphousone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment