Hello everybody:
I am a Chinese developer.I was confused by pubsub notifications,I try to
find out how to filter these notifications, but I failed,so I send this email
to get some advice from you,thanks.
I use my own xmpp client(writen by delphi 7,it's all developped by me) to
publish avatar(JEP0084) to my openfire server(ver3.6.3), once I published,then
all of my online rosters got the notifications(urn:xmpp:avatar:data and
urn:xmpp:avatar:metadata), that's fine. But when my roster quit the client and
then relogin, he will always get the same notifications, packages like
below(data has been omitted):
<message to="m...@fuyootrh/jexchange" from="t...@fuyootrh"
id="t...@fuyootrh__mm@fuyootrh__D9k1o"><event
xmlns="http://jabber.org/protocol/pubsub#event"><items
node="urn:xmpp:avatar:data"><item
id="2c86382646bd4f487790185dd0d799554ac56c1c"><data
xmlns="urn:xmpp:avatar:data">...</data></item></items></event><x
xmlns="jabber:x:delay" stamp="2009-07-15T13:19:40.890Z"/><addresses
xmlns="http://jabber.org/protocol/address"><address type="replyto"
jid="t...@fuyootrh/jexchange"/></addresses></message>
<message to="m...@fuyootrh/jexchange" from="t...@fuyootrh"
id="t...@fuyootrh__mm@fuyootrh__13ge4"><event
xmlns="http://jabber.org/protocol/pubsub#event"><items
node="urn:xmpp:avatar:metadata"><item
id="2c86382646bd4f487790185dd0d799554ac56c1c"><metadata
xmlns="urn:xmpp:avatar:metadata"><info
id="2c86382646bd4f487790185dd0d799554ac56c1c" type="image/png" bytes="11302"
height="75" width="75"/></metadata></item></items></event><x
xmlns="jabber:x:delay" stamp="2009-07-15T13:19:40.984Z"/><addresses
xmlns="http://jabber.org/protocol/address"><address type="replyto"
jid="t...@fuyootrh/jexchange"/></addresses></message>
I just set pubsub options to cancel these notifications like below, and the
server told me success, it's not OK.
<iq type="set"
to="m...@fuyootrh"
id="config9">
<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
<configure node="urn:xmpp:avatar:data">
<x xmlns="jabber:x:data" type="submit">
<field var="pubsub#send_last_published_item"><value>0</value></field>
</x>
</configure>
</pubsub>
</iq>
If there are 1000+ users on the server,and everyone has 200+ rosters,all
rosters have avatars and moods,then server handle these things like that,the
network traffic will be very heavy,pubsub event storm? So I want to find a
method to tell server do not send these notifications to me,if I need to know
these,I will send query package to get it.
Thanks again.