powered by Jive Software

Newbie : subscriber is not able to get data from publisher

i am creating pubsub sample in android using Asmack library , m totally new to asmack but i succesfully installed and configured the openfire server

  1. from device 1 , i have created one node name **mytest/position **over the server and publishing few content over it.
  2. from device 2 , with a new jid , i have register listener for subsrcibtion and subscribed to **mytest/position **node.
  3. from device 1 , i am keep on publishing some information over **mytest/position **node so that other subscribers can get that.
  4. but unfortunately i am not be get any published information on device 2 , i have used listener as follows

code is taken from http://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/ pubsub.html#retrieve

// Create a pubsub manager using an existing Connection

PubSubManager mgr = new PubSubManager(con);

// Get the node

LeafNode node = mgr.getNode(“mytest/position”);

node.addItemEventListener(new ItemEventCoordinator());


class ItemEventCoordinator implements ItemEventListener



public void handlePublishedItems(ItemPublishEvent items)


System.out.println("Item count: " + items.getItems().size());




there is listner then why its not being called ? i have test the subscribers over psi xml console where i can see the data sent my publisher but not in asmack , am i doing something wrong ?

1 Like

kavisha ,

u r wasting your time here , i am facing the same problem and there is no one who can suggest you the solution here. so go n look for some other stable and better library.