RSS Feed Reader Adapter.

An RSS Feed Reader adapter opens a connection to a given URL and, once a connection is established, reads rows from this connection.

Property Name (Screen)

Property Name (Attach Adapter)

Type

Description

URL

URL

String

The RSS feed URL.

Ignore URL Errors

IgnoreErrors

Boolean

Specifies how the adapter behaves if it cannot connect to the URL when it starts. If true, the adapter attempts to reconnect every five minutes. If false, the adapter exits.

Refresh interval (microseconds)

RefreshInterval

String. Default: 60000000 microseconds (60 seconds)

Specifies how often to poll the RSS feed at the given URL. This can be a number of microseconds or a string of the form "# <unit>", for example, "10 seconds" or "1 minute". Note that not all valid formats for the INTERVAL data type may be used in this field.

Note: Each input stream has a property (see the stream's Properties tab in Sybase CEP Studio) that can specify whether to use the current server timestamp value instead of the row timestamp set by the adapter. If this stream property is set to true, it overrides any row timestamp set by the adapter.

The adapter filters out the messages it has already seen and publishes to the stream only the messages that are new in the feed using the 'pubDate' RSS message field. The RSS feed item is converted to a message using mapping between Sybase CEP schema column names and RSS feed item elements. For example, if the Sybase CEP schema has 3 fields named title, link, and description, then the Sybase CEP message for the following RSS "item":

<item>
<title>Star City</title>
<link>http://nasa.gov/news/SpacePoll.asp</link>
<description>Space Exploration</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://nasa.gov/2003/06/03.xml#item573</guid>
</item>

is:

"title", "link", "description"
---------------------------------
"Star City", "http://nasa.gov/news/SpacePoll.asp", "Space Exploration"

Source code for this adapter is provided. If you wish to create a customized version of this adapter\:

The RSS adapter is an in-process adapter. For detailed instructions about compiling and linking an in-process adapter, see Sybase CEP C/C++ SDK.