How to consume a Chunked HTTP Stream with Apache Camel? -


i have issue consuming chunked http rsvp stream using camel.

the stream here , can find more information @ end of this page

i have created simple route such:

from("http4://stream.meetup.com/2/rsvps").log(org.apache.camel.logginglevel.info, "meetupelasticsearch.log", "json rsvp ${body}") 

but nothing happens no message consumed. tried adding camel timer before because not sure can use http4 component directly in from result same.

can me please?

you cannot use http4 component in from() directive.

however, there several ways call url , retrieve result:

one create timer , call http4 component to() this:

from("quartz2://httppoll/mytimer?trigger.repeatcount=0")     .to("http4://stream.meetup.com/2/rsvps")     .log("body is: ${body}")     .to(mockdestination); 

another way use content enricher pattern if want example aggegates results 1 stucture.

note well, if url dynamic must use recipientlist() instead to().

update:

another way consume stream internet use component http4: camel-stream.

this 1 can declare in from()directive:

 // read stream given url... publish in queue     from("stream:url?url=http://stream.meetup.com/2/rsvps&scanstream=true&retry=true").       to("seda:processingqueue");      // read records processing queue     // , them.     from("seda:processingqueue").to("log:out") 

you can see more sample in this site.


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -