Modified: websites/production/camel/content/rss.html
==============================================================================
--- websites/production/camel/content/rss.html (original)
+++ websites/production/camel/content/rss.html Wed Jan 31 13:20:57 2018
@@ -75,14 +75,7 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="RSS-RSSComponent">RSS
Component</h2><p>The <strong>rss:</strong> component is used for polling RSS
feeds. Camel will default poll the feed every 60th seconds.</p><p>Maven users
will need to add the following dependency to their <code>pom.xml</code> for
this component:</p><parameter
ac:name="">xml</parameter><plain-text-body><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>
-</plain-text-body><p><strong>Note:</strong> The component currently only
supports polling (consuming) feeds.</p><rich-text-body><p>Camel-rss internally
uses a <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/rome-1.0/">patched
version</a> of <a shape="rect" class="external-link"
href="http://rometools.github.io/rome/" rel="nofollow">ROME</a> hosted on
ServiceMix to solve some OSGi <a shape="rect" class="external-link"
href="https://issues.apache.org/jira/browse/SMX4-510">class loading
issues</a>.</p></rich-text-body><h3 id="RSS-URIformat">URI
format</h3><plain-text-body>rss:rssUri
-</plain-text-body><p>Where <code>rssUri</code> is the URI to the RSS feed to
poll.</p><p>You can append query options to the URI in the following format,
<code>?option=value&option=value&...</code></p><h3
id="RSS-Options">Options</h3><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Property</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>splitEntries</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, Camel
splits a feed into its individual entries and returns each entry, poll by poll.
For example, if a feed contains seven entries, Camel returns the first e
ntry on the first poll, the second entry on the second poll, and so on. When
no more entries are left in the feed, Camel contacts the remote RSS URI to
obtain a new feed. If <code>false</code>, Camel obtains a fresh feed on every
poll and returns all of the feed's entries.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>filter</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Use in combination with the
<code>splitEntries</code> option in order to filter returned entries. By
default, Camel applies the <code>UpdateDateFilter</code> filter, which returns
only new entries from the feed, ensuring that the consumer endpoint never
receives an entry more than once. The filter orders the entries
chronologically, with the newest returned last.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>throttleEntries</code></p></td><td colspan="1"
rowspan=
"1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Sets whether
all entries identified in a single feed poll should be delivered immediately.
If true, only one entry is processed per consumer.delay. Only applicable when
splitEntries is set to true.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>lastUpdate</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Use in combination with the
<code>filter</code> option to block entries earlier than a specific date/time
(uses the <code>entry.updated</code> timestamp). The format is:
<code>yyyy-MM-ddTHH:MM:ss</code>. Example:
<code>2007-12-24T17:45:59</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>feedHeader</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td cols
pan="1" rowspan="1" class="confluenceTd"><p>Specifies whether to add the ROME
<code>SyndFeed</code> object as a header.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>sortEntries</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>splitEntries</code> is
<code>true</code>, this specifies whether to sort the entries by updated
date.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>60000</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Delay in milliseconds between each
poll.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Milliseconds b
efore polling starts.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.userFixedDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Set to <code>true</code> to use
fixed delay between pools, otherwise fixed rate is used. See <a shape="rect"
class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html"
rel="nofollow">ScheduledExecutorService</a> in JDK for
details.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>username</code></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.16:</strong><span> For basic
authentication when polling from a HTTP feed</span></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>password</code></td><td
colspan="1" rowspan="1" class="confluenceTd">&#
160;</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel
2.16:</strong><span> For basic authentication when polling from a HTTP
feed</span></td></tr></tbody></table></div></rich-text-body><h3
id="RSS-Exchangedatatypes">Exchange data types</h3><p>Camel initializes the In
body on the Exchange with a ROME <code>SyndFeed</code>. Depending on the value
of the <code>splitEntries</code> flag, Camel returns either a
<code>SyndFeed</code> with one <code>SyndEntry</code> or a
<code>java.util.List</code> of <code>SyndEntrys</code>.</p><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Behavior</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1
" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>A single entry from the current
feed is set in the exchange.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The entire list of entries from the current
feed is set in the
exchange.</p></td></tr></tbody></table></div></rich-text-body><h3
id="RSS-MessageHeaders">Message Headers</h3><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>CamelRssFeed</code></p></td><td
colspan="1" rowspan="1" class="con
fluenceTd"><p>The entire <code>SyncFeed</code>
object.</p></td></tr></tbody></table></div></rich-text-body><h3
id="RSS-RSSDataformat">RSS Dataformat</h3><p>The RSS component ships with an
RSS dataformat that can be used to convert between String (as XML) and ROME RSS
model objects.</p><ul><li>marshal = from ROME <code>SyndFeed</code> to XML
<code>String</code></li><li>unmarshal = from XML <code>String</code> to ROME
<code>SyndFeed</code></li></ul><p>A route using this would look something like
this:<plain-text-body>{snippet:id=ex|lang=java|url=camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssDataFormatTest.java}</plain-text-body>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:<plain-text-body>{snippet:id=ex|lang=java|url=camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/Rss
FilterWithXPathTest.java}</plain-text-body></p><parameter
ac:name="title">Query parameters</parameter><rich-text-body><p>If the URL for
the RSS feed uses query parameters, this component will understand them as
well, for example if the feed uses <code>alt=rss</code>, then you can for
example do<br clear="none"> <code>from("rss:<a shape="rect"
class="external-link"
href="http://someserver.com/feeds/posts/default?alt=rss&splitEntries=false&consumer.delay=1000"
rel="nofollow">http://someserver.com/feeds/posts/default?alt=rss&splitEntries=false&consumer.delay=1000</a>").to("bean:rss");</code></p></rich-text-body><h3
id="RSS-Filteringentries">Filtering entries</h3><p>You can filter out entries
quite easily using XPath, as shown in the data format section above. You can
also exploit Camel's <a shape="rect" href="bean-integration.html">Bean
Integration</a> to implement your own conditions. For instance, a filter
equivalent to the XPath example above would be:<plain-text-bod
y>{snippet:id=ex1|lang=java|url=camel/trunk/components/camel-rss/src/test/java/org/apache/camel/component/rss/RssFilterTest.java}</plain-text-body>The
custom bean for this would
be:<plain-text-body>{snippet:id=ex2|lang=java|url=camel/trunk/components/camel-rss/src/test/java/org/apache/camel/component/rss/RssFilterTest.java}</plain-text-body><parameter
ac:name=""><a shape="rect" href="endpoint-see-also.html">Endpoint See
Also</a></parameter></p><ul class="alternate"><li><a shape="rect"
href="atom.html">Atom</a></li></ul></div>
+<div class="wiki-content maincontent"><h2
id="RSS-Thispageisoutdated,forthecurrentversionsee:https://github.com/apache/camel/blob/master/components/camel-rss/src/main/docs/rss-component.adoc">This
page is outdated, for the current version see: <a shape="rect"
class="external-link"
href="https://github.com/apache/camel/blob/master/components/camel-rss/src/main/docs/rss-component.adoc"
rel="nofollow">https://github.com/apache/camel/blob/master/components/camel-rss/src/main/docs/rss-component.adoc</a></h2><h2
id="RSS-RSSComponent">RSS Component</h2><p>The <strong>rss:</strong> component
is used for polling RSS feeds. Camel will default poll the feed every 60th
seconds.</p><p>Maven users will need to add the following dependency to their
<code>pom.xml</code> for this component:</p><p>xml<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-rss</artifactId>
<version>x.x.x</version> <!-- use the same version as your Camel
core vers
ion --> </dependency></p><p><strong>Note:</strong> The component
currently only supports polling (consuming) feeds.</p><p>Camel-rss internally
uses a <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/rome-1.0/">patched
version</a> of <a shape="rect" class="external-link"
href="http://rometools.github.io/rome/" rel="nofollow">ROME</a> hosted on
ServiceMix to solve some OSGi <a shape="rect" class="external-link"
href="https://issues.apache.org/jira/browse/SMX4-510">class loading
issues</a>.</p><h3 id="RSS-URIformat">URI format</h3><p>rss:rssUri</p><p>Where
<code>rssUri</code> is the URI to the RSS feed to poll.</p><p>You can append
query options to the URI in the following format,
<code>?option=value&option=value&...</code></p><h3
id="RSS-Options">Options</h3><p>confluenceTableSmall</p><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Property</p
></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th
>colspan="1" rowspan="1"
>class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
>rowspan="1" class="confluenceTd"><p><code>splitEntries</code></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, Camel
>splits a feed into its individual entries and returns each entry, poll by
>poll. For example, if a feed contains seven entries, Camel returns the first
>entry on the first poll, the second entry on the second poll, and so on. When
>no more entries are left in the feed, Camel contacts the remote RSS URI to
>obtain a new feed. If <code>false</code>, Camel obtains a fresh feed on every
>poll and returns all of the feed's entries.</p></td></tr><tr><td colspan="1"
>rowspan="1" class="confluenceTd"><p><code>filter</code></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></
td><td colspan="1" rowspan="1" class="confluenceTd"><p>Use in combination with
the <code>splitEntries</code> option in order to filter returned entries. By
default, Camel applies the <code>UpdateDateFilter</code> filter, which returns
only new entries from the feed, ensuring that the consumer endpoint never
receives an entry more than once. The filter orders the entries
chronologically, with the newest returned last.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>throttleEntries</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Sets whether
all entries identified in a single feed poll should be delivered immediately.
If true, only one entry is processed per consumer.delay. Only applicable when
splitEntries is set to true.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>lastUpdate</code></p></td><td colspan="
1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Use in combination with the
<code>filter</code> option to block entries earlier than a specific date/time
(uses the <code>entry.updated</code> timestamp). The format is:
<code>yyyy-MM-ddTHH:MM:ss</code>. Example:
<code>2007-12-24T17:45:59</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>feedHeader</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Specifies whether to add the ROME
<code>SyndFeed</code> object as a header.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>sortEntries</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>splitEntries</code> is
<code>true</code>, this specifies whether to sort the entries
by updated date.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>60000</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Delay in milliseconds between each
poll.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Milliseconds before polling
starts.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.userFixedDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Set to <code>true</code> to use
fixed delay between pools, otherwise fixed rate is used. See <a shape="rect"
class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/ja
va/util/concurrent/ScheduledExecutorService.html"
rel="nofollow">ScheduledExecutorService</a> in JDK for
details.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>username</code></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.16:</strong><span> For basic
authentication when polling from a HTTP feed</span></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>password</code></td><td
colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1"
rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong><span> For basic
authentication when polling from a HTTP
feed</span></td></tr></tbody></table></div><h3
id="RSS-Exchangedatatypes">Exchange data types</h3><p>Camel initializes the In
body on the Exchange with a ROME <code>SyndFeed</code>. Depending on the value
of the <code>splitEntries</code> flag, Camel returns either a
<code>SyndFeed</code> with one <code
>SyndEntry</code> or a <code>java.util.List</code> of
><code>SyndEntrys</code>.</p><p>confluenceTableSmall</p><div
>class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
>rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1"
>rowspan="1" class="confluenceTh"><p>Value</p></th><th colspan="1" rowspan="1"
>class="confluenceTh"><p>Behavior</p></th></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>A single entry from the current feed is
>set in the exchange.</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>The entire list of entries
>from the current feed is set in the exchange.</p></td></tr></tbody></tabl
e></div><h3 id="RSS-MessageHeaders">Message
Headers</h3><p>confluenceTableSmall</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>CamelRssFeed</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The entire
<code>SyncFeed</code> object.</p></td></tr></tbody></table></div><h3
id="RSS-RSSDataformat">RSS Dataformat</h3><p>The RSS component ships with an
RSS dataformat that can be used to convert between String (as XML) and ROME RSS
model objects.</p><ul><li>marshal = from ROME <code>SyndFeed</code> to XML
<code>String</code></li><li>unmarshal = from XML <code>String</code> to ROME
<code>SyndFeed</code></li></ul><p>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/ca
mel/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}</p><p>Query
parameters</p><p>If the URL for the RSS feed uses query parameters, this
component will understand them as well, for example if the feed uses
<code>alt=rss</code>, then you can for example do<br clear="none">
<code>from("rss:<a shape="rect" class="external-link"
href="http://someserver.com/feeds/posts/default?alt=rss&splitEntries=false&consumer.delay=1000"
rel="nofollow">http://someserver.com/feeds/posts/default?alt=rss&splitEntries=false&consumer.delay=1000</a>").to("bean:rss");</code></p><h3
id="RSS-Filteringentries">Filtering entries</h3><p>You can filter out entries
quite easily u
sing XPath, as shown in the data format section above. You can also exploit
Camel's <a shape="rect" href="bean-integration.html">Bean Integration</a> 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}<a
shape="rect" href="endpoint-see-also.html">Endpoint See Also</a></p><ul
class="alternate"><li><a shape="rect" href="atom.html">Atom</a></li></ul></div>
</td>
<td valign="top">
<div class="navigation">