Been googling/reading for two hours. I would like to set up a twitter like feed using PubSub.
As I understand it, I need to do two things:
Set up a PubSub service using OpenFire.
Connect to this service from my client
Create a node using my client
How do I do step 1? I can not find this anywhere in the Openfire documentation. I assume that this is in the admin panel somewhere? I see inside the GroupChat tab an option to create a new service, but that’s only for Group Chat, right?
Also, is there any way to visualize the pubsub nodes with the current version of openfire?
You can skip step 1, the pubsub service already exists.
There is no pubsub access via the admin console, , so don’t waste your time looking.
You just need to do 2 and 3 in your language and client lib of choice.
Thanks alot, rcollier.
Regarding #1 (set up a pubsub service using openfire), what is the actual url of the service? Is this configurable?
I don’t know where to send my messages to.
In examples, I see that pubsub services are located at something like “pubsub.holiday.lit” or something like that. How would I know what mine is?
Answering my own question (probably)
The domain name by default in Openfire appears to be just what I wrote above–something like “pubsub.holiday.lit”
Whatever your openfire domain name is pointed to, just prepend the word “pubsub”.
I could be wrong, though.
If I can just go ahead and say this–Openfire needs some better documentation. This was a showstopper. Tutorials or books just assume that you already have the pubsub service set up without ever telling what the url is. Yes, the service is ready to go out of the box, but it doesn’t do any good unless you know where to look.
Now, the next issue is I have no idea what the default settings are for the pubsub service. Is the access control whitelist, presence, open, etc? I’m getting an auth error, 403 forbidden as the xml IQ back, and I now wish to know what the default access is for a vanilla pubsub service. I can’t subscribe to my own node that I just created. Why it’s not open access by default I don’t know. If this is all listed somewhere, clearly, please kindly point me to where this is located.
Pretty sure that all newbies would have these exact same issues.
You are correct and you did answer your own question
As for the documentation, I believe the pubsub name is pretty standard, not that someone without that knowledge would know that. It is recorded in the OpenFire properties document. You will find many of the default settings in this document as well.
As for your problem, I have never run into that as the default config does allow you to subscribe to a node you have created. You can get the defaults by running a disco info command against pubsub. The results are recorded in the official registry.
What lib are you using to access pubsub? That is typically the more difficult part, unless you want to learn the spec to write your code.
Thanks so much. I am using XMPPFramework for iphone. I receive the following error IQ. It appears that openfire is telling me that I can’t publish an item b/c I don’t have access? What is the default access model, open?
Doesn’t that mean that anyone can subscribe to the node “test5”, and anyone can publish items to it?
The JID of the fake user who originally created node “tes5” is “firstname.lastname@example.org”
Could the unauthorized message posting be b/c mark is not the owner of node titled “test5”?
What if I want mark to be able to post to this feed as well?
It seems that I need to change Mark’s affiliation to “owner” as well. But is there a way to automatically handle this? In other words, as soon as someone subscribes to my node, “test5”, they should be granted “owner” status. So I want everyone to be an owner and everyone to be a subscriber as well.
So I seemed to fix this by setting up a node configuration option: pubsub#publish_model now has a value of “subscribers”. However, setting the value to “open” does not seem to work. I am not sure why, nor how I would go about troubleshooting. But at least subscribers to the node can now publish as well.