You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Paul Blakeley <pb...@gmail.com> on 2016/07/11 12:08:00 UTC

RSS component entries issue

I am currently trying to use the camel RSS component to take feeds from
google news.  I have included the route and the code below.  What I am
finding is that I only only get one entry for the google news feed!  When I
check the raw rss xml I can see that there are multiple entries.  Also, I
have checked another feed(bbc) and I can see that I receive multiple
entries.  Hope someone can help.

-------

<from uri="rss:
https://news.google.com/news/section?ned=uk&amp;topic=b&amp;output=rss" />

<bean ref="googleRssFeed" method="parse"/>

------

    public void parse(final Exchange exchange, @Body SyndFeed feed) {

        SyndEntry entry = (SyndEntry) feed.getEntries().get(0);

         LOG.info("pub date = "+ entry.getPublishedDate());

...

}

Re: RSS component entries issue

Posted by pbToe <pb...@gmail.com>.
Further reading on the camel component revealed that it was the ROME library
it used.  I substituted the existing route code and found that when I make
the call(See below) in the bean I actually get 10 entries and not 1, like
before! Is it me driving the camel component incorrectly, is there a bug in
the camel component or is it the version of ROME? Although, looking at the
rome version it hasnt changed since 2009! So it cant be that.

  	URL feedUrl = new
URL("https://news.google.com/news/section?ned=uk&topic=b&output=rss");
        SyndFeedInput input = new SyndFeedInput();
        SyndFeed feed = input.build(new XmlReader(feedUrl));



--
View this message in context: http://camel.465427.n5.nabble.com/RSS-component-entries-issue-tp5785007p5785034.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: RSS component entries issue

Posted by Claus Ibsen <cl...@gmail.com>.
The component split the entries by default. See the documentation at
http://camel.apache.org/rss

On Mon, Jul 11, 2016 at 1:08 PM, Paul Blakeley <pb...@gmail.com> wrote:
> I am currently trying to use the camel RSS component to take feeds from
> google news.  I have included the route and the code below.  What I am
> finding is that I only only get one entry for the google news feed!  When I
> check the raw rss xml I can see that there are multiple entries.  Also, I
> have checked another feed(bbc) and I can see that I receive multiple
> entries.  Hope someone can help.
>
> -------
>
> <from uri="rss:
> https://news.google.com/news/section?ned=uk&amp;topic=b&amp;output=rss" />
>
> <bean ref="googleRssFeed" method="parse"/>
>
> ------
>
>     public void parse(final Exchange exchange, @Body SyndFeed feed) {
>
>         SyndEntry entry = (SyndEntry) feed.getEntries().get(0);
>
>          LOG.info("pub date = "+ entry.getPublishedDate());
>
> ...
>
> }



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2