[
https://issues.apache.org/jira/browse/CAMEL-5529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Willem Jiang resolved CAMEL-5529.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.11.0
2.10.1
Applied patch into trunk and camel-2.10.x branch with thanks to Bruno.
> 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
> Assignee: Willem Jiang
> Fix For: 2.10.1, 2.11.0
>
> 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