My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
PubSubConfiguration  
Guide on how to configure the PubSub model
Updated Mar 11, 2008 by ricardov...@gmail.com

Introduction

We're using the PubSub model, where there are Publishers and Subscribers. A component that is a Subscribers "subscribes" itself to the work or results of a Publisher. This is all done through Openfire, and this guide shows how to create a PubSub node and how to subscribe to it. It continues to show how to configure it.

Creating and subscribing

In the trunk you can find a folder "scripts", wich contains two scripts:

  • create-pubsub-node.py
  • subscribe-pubsub-node.py

Run the first one to create a PubSub node, passing the following arguments:

  • the JID of the publishing node
  • the Jabber password
  • the PubSub node identifier

Example:

python create-pubsub-node.py kinti@localhost/runner "somepassword" kinti/runner/results

Now Openfire has a PubSub node, a sort of channel through with the results are passed. We've set the PubSub node to receive from kinti@localhost/runner, this is the publisher. Now we can subscribe components to this node so they will receive the published data.

You can subscribe a component by using the second script, passing these arguments:

  • the JID of the publishing node
  • the Jabber password
  • the PubSub node identifier
  • the JID of the subscribing node

Example:

python script/subscribe-pubsub-node.py kinti@localhost/runner "somepassword" kinti/runner/results kinti@localhost/buckets/logger

Now kinti@localhost/buckets/logger has been subscribed to kinti@localhost/runner in Openfire on the PubSub node kinti/runner/results. Since openfire saves this information you should never have to do this again.

Powered by Google Project Hosting