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

Shutdown Twitter instance if endpoint is shutdown

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.10.0
    • 2.10.1, 2.11.0
    • camel-twitter
    • None
    • Patch Available
    • Unknown

    Description

      Playing with dynamic routes, I found out that when TwitterEndpoints are stopped or shutdown, so should the Twitter instance too, and/or TwitterStream.

      The Twitter object (from Twitter4J) keeps connected with Twitter until a session timeout happens, which is controlled by Twitter's server-side in this case.

      This patch adds a call to Twitter.shutdown on all three endpoints, and in case of the TwitterEndpointEvent, it will call TwitterStream.shutdown() if it's just a stop of the endpoint (not complete shutdown).

      Also I added a call to restart the streaming.

      Attachments

        1. patch.diff
          6 kB
          Bruno Borges

        Issue Links

          Activity

            People

              njiang Willem Jiang
              bruno.borges Bruno Borges
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: