camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-5479) Add support for the InOut Message Exchange Pattern to the twitter UserProducer in order to be able to retrieve the unique identifier for the published tweet
Date Wed, 08 Aug 2012 06:35:10 GMT

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

Willem Jiang resolved CAMEL-5479.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.11.0
    
> Add support for the InOut Message Exchange Pattern to the twitter UserProducer in order
to be able to retrieve the unique identifier for the published tweet
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5479
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5479
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-twitter
>    Affects Versions: 2.10.0
>            Reporter: Rafael Cordones Marcos
>            Assignee: Willem Jiang
>              Labels: feature, improvement, twitter
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5479__Add_support_for_the_InOut_Message_Exchange_Pattern_to_the_twitter_UserProducer.patch
>
>
> We have a requirement in our application to be able to post to Twitter *and associate
the unique identifier for the published tweet (tweet id)* to our application specific entity.
> We are fairly new to Apache Camel and we have not been able to find a way to retrieve
the tweet id with the current twitter component implementation (based on Twitter4J). If our
current (limited) understanding of Apache Camel is correct, we believe that the way to accomplish
this would be by using the InOut [message exchange pattern (MEP)|http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html]
on the "twitter://timeline/user" endpoint. Nevertheless AFAIK the current endpoint implementation
in [UserProducer class|http://svn.apache.org/viewvc/camel/trunk/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/producer/UserProducer.java?view=markup]
only supports the InOnly MEP and *discards the response object returned by the Twitter API
which contains the published tweet id*.
> Adding InOut MEP support to the UserProducer would allow a very convenient Camel route
like this one:
> {code:java}
> from("direct:tweets")
>   ...
>   .inOut("twitter://timeline/user")
>   .transform().simple("The tweet '${body.text}' was published with the tweet id '${body.id}'")
>   ...
> {code}
> The attached patch against the current trunk implements InOut MEP support in the UserProducer
class together with two unit tests to exercise the code. We are available to provide patches
for other branches and to update the [Twitter Camel component documentation|http://camel.apache.org/twitter.html].

--
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

        

Mime
View raw message