Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
This page is outdated, for the current version see: https://github.com/apache/camel/blob/master/components/camel-rss/src/main/docs/rss-component.adocRSS ComponentThe rss: component is used for polling RSS feeds. Camel will default poll the feed every 60th seconds. Maven users will need to add the following dependency to their xml<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-rss</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> Note: The component currently only supports polling (consuming) feeds. Camel-rss internally uses a patched version of ROME hosted on ServiceMix to solve some OSGi class loading issues. URI formatrss:rssUri Where You can append query options to the URI in the following format, OptionsconfluenceTableSmall
Exchange data typesCamel initializes the In body on the Exchange with a ROME confluenceTableSmall
Message HeadersconfluenceTableSmall
RSS DataformatThe RSS component ships with an RSS dataformat that can be used to convert between String (as XML) and ROME RSS model objects.
A route using this would look something like this:{snippet:id=ex|lang=java|url=camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssDataFormatTest.java}The purpose of this feature is to make it possible to use Camel's lovely built-in expressions for manipulating RSS messages. As shown below, an XPath expression can be used to filter the RSS message:{snippet:id=ex|lang=java|url=camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssFilterWithXPathTest.java} Query parameters If the URL for the RSS feed uses query parameters, this component will understand them as well, for example if the feed uses Filtering entriesYou can filter out entries quite easily using XPath, as shown in the data format section above. You can also exploit Camel's Bean Integration to implement your own conditions. For instance, a filter equivalent to the XPath example above would be:{snippet:id=ex1|lang=java|url=camel/trunk/components/camel-rss/src/test/java/org/apache/camel/component/rss/RssFilterTest.java}The custom bean for this would be:{snippet:id=ex2|lang=java|url=camel/trunk/components/camel-rss/src/test/java/org/apache/camel/component/rss/RssFilterTest.java}Endpoint See Also |