Pubsub - how do we use it?

mbog,

Wildfire follows the 1.8 version of the spec (almost released). 1.8 is a very significant update/upgrade of the protocol. Version 2.6.2 pretty closely follows the spec, although there have been a few changes that will be addressed in the next Wildfire releases.

Regards,

Matt

hi Gato

for you answer:

Your options here are 1) change the node configuration to include payloads or to make its items persistent (you can even change the default node configuration so that new nodes do not have this “problem”) or 2) change your publish packet to not include an item

Could you please write more:

How could we change the default node configuration?

Thanks

Hey dblwood,

To learn how to change the configuration of a given node follow this link: http://www.jabber.org/jeps/jep-0060.html#owner-configure.

Current JEP version does not have support for changing the default node configurations. That means that in order to change the default node configuration you will need to do it from the server. Use the following system properties to change the default settings:

xmpp.pubsub.default.deliverPayloads (true/false)

xmpp.pubsub.default.notify.configChanges (true/false)

xmpp.pubsub.default.notify.delete (true/false)

xmpp.pubsub.default.notify.retract (true/false)

xmpp.pubsub.default.persistItems (true/false)

xmpp.pubsub.default.maxPublishedItems (-1)

xmpp.pubsub.default.presenceBasedDelivery (true/false)

xmpp.pubsub.default.sendItemSubscribe (true/false)

xmpp.pubsub.default.subscriptionEnabled (true/false)

xmpp.pubsub.default.deliverPayloads (true/false)

xmpp.pubsub.default.notify.configChanges (true/false)

xmpp.pubsub.default.notify.delete (true/false)

xmpp.pubsub.default.notify.retract (true/false)

xmpp.pubsub.default.presenceBasedDelivery (true/false)

xmpp.pubsub.default.subscriptionEnabled (true/false)

xmpp.pubsub.default.maxLeafNodes (-1)

System properties can be set/modified from the admin console.

Regards,

– Gato

Thanks Gato

I have tried to set

xmpp.pubsub.default.deliverPayloads

xmpp.pubsub.default.persistItems

but still get error.

if user1 create node1 and want to publish:

if user1 try to publish an item to node2 ( created by user2)

get error 403

how to fix?

many thanks

hello Gato

  1. I already set both:

xmpp.pubsub.default.deliverPayloads

xmpp.pubsub.default.persistItems

as true

but when I try to create a new node, in table “pubsubNode”,

colum “deliverPayloads” and “persistItems” still get 0 not 1

  1. if user1 subscribes node2 (created by user2)

in the table “pubsubAffiliation”, the “affiliation” is “none”

which property should be set to modify this?

  1. Do you have a “pubsub” document, say “pubsub” user guide?

Thank you very much.

use this xmlns to delete the nodes.

xmlns=“http://jabber.org/protocol/pubsub#owner

Hi dblwood ,

I was also not able to set both the properties using the wildfire admin console.

But you can set the properties using this XML while creating the nodes.

This XML will create a “/newnode” with the given configuration.

<iq type=’‘set’’

from=’‘admin@impetus-634/PubSubClient1’’

to=’‘pubsub.jitendra.com’’

id=’‘create1’’>

<pubsub xmlns=’‘http://jabber.org/protocol/pubsub’’>

<create node=’‘newnode’’/>

<configure>

<x xmlns=’‘jabber:x:data’’ type=’‘submit’’>

<field var=’‘FORM_TYPE’’ type=’‘hidden’’>

<value>[http://jabber.org/protocol/pubsub#node_config]

</field>

<field var=’‘pubsub#title’’><value>New Node </value></field>

<field var=’‘pubsub#deliver_payloads’’><value>1</value></field>

<field var=’‘pubsub#persist_items’’><value>1</value></field>

<field var=’‘pubsub#max_items’’><value>10</value></field>

<field var=’‘pubsub#access_model’’><value>open</value></field>

<field var=’‘pubsub#publish_model’’><value>publishers</value></field >

<field var=’‘pubsub#send_item_subscribe’’><value>true</value></field >

<field var=’‘pubsub#presence_based_delivery’’><value>true</value></f ield>

<field var=’‘pubsub#notify_config’’><value>1</value></field>

<field var=’‘pubsub#notify_delete’’><value>1</value></field>

<field var=’‘pubsub#notify_retract’’><value>1</value></field>

<field var=’‘pubsub#max_payload_size’’><value>1028</value></field&gt ;

<field var=’‘pubsub#type’’><value>[http://www.w3.org/2005/Atom]

<field var=’‘pubsub#body_xslt’’>

<value>[http://jabxslt.jabberstudio.org/atom_body.xslt]

</field>

</x>

</configure>

</pubsub>

</iq>

Regards,

Jitendra

We just ran into the exact same problem. It turns out that once the default configuration is created in the database no amount of fiddling with the properties in the admin console has any effect. The code only looks at the properties settings if it can’'t get a configuration from the database. So, at present it seems that to change the default configuration you have to go into the database.

Hey Ward,

That is correct. For Wildfire 3.1 I simplified the logic and removed

those system properties since they were redundant. That means that the

only way to change the default is by doing it directly in the database.

Regards,

– Gato