PubSub Collection nodes

Hi All,

How can i use the feature of collection nodes in the Wildfire.

i am able to create a collection node on wildfire but cann’'t assign a leaf node into it.

I want to create this hierarchy.

/ (root node)
|
|--- /group1   (collection node where "suUser" user is subscribed)
         |
         |--- /Node1 (leaf node where "User1" user is subscribed)
         |
         |--- /Node2 (leaf node where "User2" user is subscribed)

Now if anyone publish items on “/User1” node then it is also published to “/group1” node means “suUser” will get the published item.

Regards,

Jitendra

Hi,

did you take a look at http://www.jivesoftware.org/articles/pubsub.jsp ?

For me it looks like that you must create the leaf nodes within the collection node, like

<iq type="set" to="pubsub.example.com" id="1">
  <pubsub xmlns=''http://jabber.org/protocol/pubsub''>
      <create node=''/collection1''></create>
      <configure></configure>
    </pubsub>
</iq>
<iq type="set" to="pubsub.example.com" id="2">
  <pubsub xmlns=''http://jabber.org/protocol/pubsub''>
      <create node=''/collection1/leaf1''></create>
      <configure></configure>
    </pubsub>
</iq>
<iq type="set" to="pubsub.example.com" id="3">
  <pubsub xmlns=''http://jabber.org/protocol/pubsub''>
      <create node=''/collection1/leaf2''></create>
      <configure></configure>
    </pubsub>
</iq>
<iq type="get" to="pubsub.example.com" id="4">
     <query xmlns=''http://jabber.org/protocol/disco#items''></query>
</iq>

LG

Thanks for Reply

I am able to create these nodes but How i can subscribe to a Collection node.

Subscribing a collection node needs a JID in XML.

So which JID i have to send with the XML. I think that needs a node’'s JID. Am i right?

and from where i can get/set the JID of a node.

Got it…

But do let me know the sequence that i m using is correct or not ?

  1. “suUser” subscribe to “/collection1” node with the JID "su@example.com"

  2. Now “suUser” subscribe to a collection node with the given XML in JEP using above JID

  3. any user publishes the information on “/collection1/leaf1” then it is published to “suUser” also.

The Above method that i have used is not working as expected.

if i create the above hierarchy then the pubsub is working fine.

But when i create this hierarchy then i am facing a probelm, and not getting the expected output.

/
|
|
|-------/C1         <----- "SU1" user is subscribed
|       |
|       |
|       |-------/C1/C2  <----- "SU2" user is subscribed
|               |
|               |
|               |-------/C1/C2/L1    <------ "User1" user is subscribed
|    |    |-------/C2      <----- "SU3" user is subscribed
        |
        |
        |-------/C2/L2    <----- "User2" user is subscribed

Case 1:

When admin publishes an item on the /C1/C2/L1 node then that item is published to all collectionn nodes. I am expecting that only /C1 and /C1/C2 must get this item.

I am using the above methods to subscribe the collection nodes.

Regards,

Jitendra

Yes I got the solution for each and every thing about the Collection Nodes.

Regards,

Jitendra

Hi Jitendra,

jchittoda wrote:

When admin publishes an item on the /C1/C2/L1 node then that item is published to all collectionn nodes. I am expecting that only /C1 and /C1/C2 must get this item.

So, what’'s the solution?

Hi all,

can any one provide the sequence of steps to follow to develop a pubsub service using su-smack API for a sample application.

Thank you,

Hi Vidhya,

You can use the su-Smack to create your hierarchy, But su-Smack sometimes doesn’'t work.

It does not support the collection nodes.

You will find the problem with su-smack while deleting/purging the nodes.

If u want to use then u have modify su-smack accordingly.

In future Smack will support for the Pub/Sub. Jive people are planning to launch the support for Pub/Sub in Smack.

Regards,

Jitendra

Thank you jithendra.

I would like to know the procedure for developing sample application that uses pubsub service using su-smack API. What are the sequence of steps do i need to follow.

Once again thank you for the information.

Regards,

vidya

Hi Vidhya,

I would appriciate if u can create a new thread for this(su-smack) question, because it will be easier to search in future if somebody is heaving same problem.

Because this thread only concentrate about the Pub/Sub collection node.

Regards,

Jitendra

okay! I will do that, thank you