Overview
The feeds plugin allows users to subscribe to and receive
notifications from RSS and Atom feeds via a Openfire component
using any IM client. The plugin can receive update notifications
from services that support the XML-RPC ping notification system and
supports REST based web services for managing users subscriptions to
feeds.
Installation
Copy the instantFeeds.jar into the plugins directory of your Openfire
installation. The plugin will then be automatically deployed. To upgrade to a
new version, copy the new instantFeeds.jar file over the existing file.
Configuration
The following properties can be set to customize the instantFeeds installation:
-
plugin.instantFeeds.serviceName: the name of the service you want users to interact with,
default is 'feeds'. Note that this account will be automatically created by the plugin
if it doesn't already exist.
-
plugin.instantFeeds.servicePassword: the password for the service / user created by the
system. Default is 'password'.
-
plugin.instantFeeds.allowedUsers: a comma delimited list of users who are allowed to
interact with the service. Defaults to an empty string which means all users can
interact with the system.
-
plugin.instantFeeds.allowedGroups: a comma delimited list of groups who are allowed
to interact with the service. Defaults to an empty string which means all groups
can interact with the system.
-
plugin.instantFeeds.numThreads: the number of threads you want each subservice (notifiers,
subscribers, and pollers) to use, default is 2.
-
plugin.instantFeeds.pollInterval: the number of milliseconds to wait between each poll of
existing feeds. Default is 15 minutes (900000 milliseconds).
-
plugin.instantFeeds.serverName: the path to the HTTP server that will handle verification
clicks. Defaults to http://yourserver.com:9090/plugins/instantfeeds/api. Note that this
server name can be shortened through the use of mod_proxy and mod_rewrite, see the readme
for more information.
-
plugin.instantFeeds.proxyHost: the host name of the proxy server to use when making HTTP
requests for RSS / Atom feeds. Optional.
-
plugin.instantFeeds.proxyPort: the port of the proxy server to use when making HTTP
requests for RSS / Atom feeds. Optional.
Working With Firewalls
Because the instantFeeds plugin runs within the Openfire admin console web container, users
behind firewalls may have problems accessing the HTTP services it provides. For example, if
the Openfire admin console runs on the default port of 9090 and a user is only allowed to
receive HTTP traffic on port 80, then a web request like the following won't work:
http://www.example.com:9090/plugins/instantFeeds/
One solution for Apache users is to use mod_rewrite, mod_proxy and mod_proxy_http to serve
traffic for the plugin on port 80. Sample Apache configuration entries for performing this mapping
are below. Essentially, we make Apache intercept all requests for the presence plugin on port 80 and
then proxy a real connection to the HTTP server on port 9090.
1 2 3 4 5 6 7 8 9
|
<virtualhost *:80>
servername example.com
....
ProxyVia On
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/api/
RewriteRule ^/(.*) http://example.com:9090/plugins/instantFeeds/$1 [P]
</virtualhost> |
Using the plugin
The plugin can be accesed by end users by sending instant messages
to 'feeds.$yourserver$' or 'feeds@$yourserver$' where $yourserver$ is the Server Name
of your Openfire
installation. The component supports the following commands:
- help: Returns a list of commands available via the component.
- list: Returns a list of feeds the user has subscribed to.
- subscribe $feed: Subscribes the user to the given feed where
$feed is the URL of an RSS or Atom feed.
- $feed: Subscribes the user to the given feed where
$feed is the URL of an RSS or Atom feed.
- unsubscribe $feed: Unsubscribes the user from the given feed
where $feed is the URL of an RSS or Atom feed..
- off: Turns off notifications for the given user.
- on: Turns on notifications for the given user.
- status: Returns the current notification status for the given user.