camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Cordones Marcos <>
Subject Twitter component: Obtaining the unique identifier of the published tweet
Date Tue, 31 Jul 2012 12:54:17 GMT

When sending a request to publish a tweet to the Twitter API, the
response will contain the "the unique identifier of the published
tweet" (tweet id). Our application needs to store such tweet IDs and
associate them with application-specific entities.

We are fairly new with Apache Camel but as far as we have been to find
out, the current "twitter://timeline/user" endpoint implementation (in
the UserProducer class, see [1]) disregards the response object
received from the Twitter4J library which contains (among others) the
unique status update id (tweet id).

We have implemented support for the InOut message exchange pattern
which allows to process the response object received from the Twitter
API when publishing a tweet and created a JIRA issue with the patch
and unit tests:

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

This allows access to the Twitter API response object when using the
InOut MEP in a route:

  .transform().simple("The tweet '${body.text}' was published with the
tweet id '${}'")




View raw message