It's not difficult to let the SearchConsumer endpoint work as an Event-driven too.
I'm going to work on this on a few weeks, but of course you can code your own if you are in a hurry :-) *Bruno Borges* (21) 7672-7099 *www.brunoborges.com* On Sat, Jun 2, 2012 at 6:06 PM, Christian Müller < [email protected]> wrote: > "twitter://search" is only supported in the camel-twitter consumer -> > from("twitter://search?...") > Have a look at the source code or the unit tests... > > Best, > Christian > > On Fri, Jun 1, 2012 at 7:25 PM, soumya_sd <[email protected]> wrote: > > > I'm trying to use Camel twitter component. > > http://camel.apache.org/twitter.html > > > > I want to create a route like - > > > > from("direct:twitter-search").to( > > > > > > > "twitter://search?type=polling&delay=20&keywords=mykeywords&consumerKey=key&consumerSecret=secret&accessToken=xxxxxxx&accessTokenSecret=yyyysecretxxxx") > > .to("stream:out"); > > > > > > > > > > However, looks like this is not supported (see exception below). Can > > someone > > explain why? > > > > > > *org.apache.camel.FailedToCreateProducerException: Failed to create > > Producer > > for endpoint: > > > > > Endpoint[twitter://search?...........&delay=20&keywords=mykeyword&type=polling]. > > Reason: java.lang.IllegalArgumentException: Cannot create any producer > with > > uri > > > > > twitter://search?accessToken=.........&delay=20&keywords=mykeyword&type=polling. > > A producer type was not provided (or an incorrect pairing was used).* > > > > Given that twitter component internally makes use of HTTP REST calls it > > should be possible to use it both as a consumer as well as a producer. > > > > For example, I can successfully execute the following route with the http > > component. I cannot understand why I cannot do the same with the twitter > > component ? > > > > from("direct:startgoogleplaces") > > .process(new HTTPRequestParamProcessor()) > > .setHeader( > > Exchange.HTTP_QUERY, > > > > > > > simple("location=${in.headers.location}&radius=${in.headers.radius}&types=${in.headers.types}&sensor=${in.headers.sensor}&key=${in.headers.key}")) > > .to(" > > https://maps.googleapis.com/maps/api/place/search/json") > > .unmarshal() > > .json(JsonLibrary.Jackson, > > GooglePlaceResponseObject.class) > > .log("before split the body is > > ${body}").to("stream:out); > > > > > > > > > > > > > > -- > > View this message in context: > > > http://camel.465427.n5.nabble.com/Why-is-this-not-possible-with-the-twitter-component-in-Camel-2-10-tp5713823.html > > Sent from the Camel - Users mailing list archive at Nabble.com. > > >
