Project

General

Profile

PubSub on_sub_and_presence

Julia Zashchitina
Added about 3 years ago

Hello everyone!

We try to send the following request from client to Tigase PubSub:

<iq type="set" to="pubsub.domainname.net" id="5437ABBE-C499-4F3E-8267-41DC157428D4">
  <pubsub xmlns="http://jabber.org/protocol/pubsub">
    <create node="375336667236_domainname_user_public_profile"/>
    <configure>
      <x xmlns="jabber:x:data" type="submit">
        <field var="FORM_TYPE" type="hidden">
          <value>http://jabber.org/protocol/pubsub#node_config</value>
        </field>
        <field var="pubsub#notification_type">
          <value>headline</value>
        </field>
        <field var="pubsub#publish_model">
          <value>publishers</value>
        </field>
        <field var="pubsub#presence_based_delivery">
          <value>1</value>
        </field>
        <field var="pubsub#send_last_published_item">
          <value>on_sub_and_presence</value>
        </field>
        <field var="pubsub#max_items">
          <value>1</value>
        </field>
        <field var="pubsub#access_model">
          <value>open</value>
        </field>
        <field var="pubsub#purge_offline">
          <value>0</value>
        </field>
        <field var="pubsub#notify_config">
          <value>0</value>
        </field>
        <field var="pubsub#notify_sub">
          <value>0</value>
        </field>
        <field var="pubsub#deliver_notifications">
          <value>1</value>
        </field>
        <field var="pubsub#persist_items">
          <value>1</value>
        </field>
        <field var="pubsub#deliver_payloads">
          <value>0</value>
        </field>
        <field var="pubsub#notify_delete">
          <value>0</value>
        </field>
        <field var="pubsub#title">
          <value>Public Profile</value>
        </field>
        <field var="pubsub#notify_retract">
          <value>0</value>
        </field>
        <field var="pubsub#max_payload_size">
          <value>1024</value>
        </field>
      </x>
    </configure>
  </pubsub>
</iq>

Which results in . However, if we use pubsub#send_last_published_item = on_sub instead of on_sub_and_presence it all works fine.

Could you please explain how to fix this? Log and init.properties files are attached.


Replies (2)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 3 years ago

Due to fact that feature which sends last published item on presence may cause increased traffic and may cause performance issue it is disabled by default - when it is disabled it is not possible to create node which requires this feature.

To enable this feature please add following line to your etc/init.properties file:

pubsub/send-last-published-item-on-presence[B]=true

Added by Julia Zashchitina about 3 years ago

Thank you!

    (1-2/2)