[ 
https://issues.apache.org/jira/browse/CAMEL-5529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bruno Borges updated CAMEL-5529:
--------------------------------

    Attachment: patch.diff
    
> Shutdown Twitter instance if endpoint is shutdown
> -------------------------------------------------
>
>                 Key: CAMEL-5529
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5529
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-twitter
>    Affects Versions: 2.10.0
>            Reporter: Bruno Borges
>         Attachments: patch.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to