You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Michael Jakl (JIRA)" <ji...@apache.org> on 2009/05/31 23:40:07 UTC
[jira] Updated: (VYSPER-54) Publish to a node (XEP-0060 7.1)
[ https://issues.apache.org/jira/browse/VYSPER-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Jakl updated VYSPER-54:
-------------------------------
Attachment: VYSPER-54.1.patch
Full patch against rev778637 (including patches from VYSPER-53).
> Publish to a node (XEP-0060 7.1)
> --------------------------------
>
> Key: VYSPER-54
> URL: https://issues.apache.org/jira/browse/VYSPER-54
> Project: VYSPER
> Issue Type: Sub-task
> Reporter: Michael Jakl
> Assignee: Michael Jakl
> Attachments: VYSPER-54.1.patch
>
>
> The main use case for the pubsub service is of course publishing and distribution of messages.
> <iq type='set'
> from='hamlet@denmark.lit/blogbot'
> to='pubsub.shakespeare.lit'
> id='publish1'>
> <pubsub xmlns='http://jabber.org/protocol/pubsub'>
> <publish node='princely_musings'>
> <item id='bnd81g37d61f49fgn581'>
> <entry xmlns='http://www.w3.org/2005/Atom'>
> <title>Soliloquy</title>
> <summary>
> To be, or not to be: that is the question:
> Whether 'tis nobler in the mind to suffer
> The slings and arrows of outrageous fortune,
> Or to take arms against a sea of troubles,
> And by opposing end them?
> </summary>
> <link rel='alternate' type='text/html'
> href='http://denmark.lit/2003/12/13/atom03'/>
> <id>tag:denmark.lit,2003:entry-32397</id>
> <published>2003-12-13T18:30:02Z</published>
> <updated>2003-12-13T18:30:02Z</updated>
> </entry>
> </item>
> </publish>
> </pubsub>
> </iq>
> Answer from the server:
> <iq type='result'
> from='pubsub.shakespeare.lit'
> to='hamlet@denmark.lit/blogbot'
> id='publish1'>
> <pubsub xmlns='http://jabber.org/protocol/pubsub'>
> <publish node='princely_musings'>
> <item id='ae890ac52d0df67ed7cfdf51b644e901'/>
> </publish>
> </pubsub>
> </iq>
> Notification of subscriber (with payload):
> Example 93. Subscribers receive event notifications with payloads
> <message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>
> <event xmlns='http://jabber.org/protocol/pubsub#event'>
> <items node='princely_musings'>
> <item id='ae890ac52d0df67ed7cfdf51b644e901'>
> <entry xmlns='http://www.w3.org/2005/Atom'>
> <title>Soliloquy</title>
> <summary>
> To be, or not to be: that is the question:
> Whether 'tis nobler in the mind to suffer
> The slings and arrows of outrageous fortune,
> Or to take arms against a sea of troubles,
> And by opposing end them?
> </summary>
> <link rel='alternate' type='text/html'
> href='http://denmark.lit/2003/12/13/atom03'/>
> <id>tag:denmark.lit,2003:entry-32397</id>
> <published>2003-12-13T18:30:02Z</published>
> <updated>2003-12-13T18:30:02Z</updated>
> </entry>
> </item>
> </items>
> </event>
> </message>
> <message from='pubsub.shakespeare.lit' to='bernardo@denmark.lit' id='bar'>
> <event xmlns='http://jabber.org/protocol/pubsub#event'>
> <items node='princely_musings'>
> <item id='ae890ac52d0df67ed7cfdf51b644e901'>
> <entry xmlns='http://www.w3.org/2005/Atom'>
> <title>Soliloquy</title>
> <summary>
> To be, or not to be: that is the question:
> Whether 'tis nobler in the mind to suffer
> The slings and arrows of outrageous fortune,
> Or to take arms against a sea of troubles,
> And by opposing end them?
> </summary>
> <link rel='alternate' type='text/html'
> href='http://denmark.lit/2003/12/13/atom03'/>
> <id>tag:denmark.lit,2003:entry-32397</id>
> <published>2003-12-13T18:30:02Z</published>
> <updated>2003-12-13T18:30:02Z</updated>
> </entry>
> </item>
> </items>
> </event>
> </message>
> <message from='pubsub.shakespeare.lit' to='horatio@denmark.lit' id='baz'>
> <event xmlns='http://jabber.org/protocol/pubsub#event'>
> <items node='princely_musings'>
> <item id='ae890ac52d0df67ed7cfdf51b644e901'>
> <entry xmlns='http://www.w3.org/2005/Atom'>
> <title>Soliloquy</title>
> <summary>
> To be, or not to be: that is the question:
> Whether 'tis nobler in the mind to suffer
> The slings and arrows of outrageous fortune,
> Or to take arms against a sea of troubles,
> And by opposing end them?
> </summary>
> <link rel='alternate' type='text/html'
> href='http://denmark.lit/2003/12/13/atom03'/>
> <id>tag:denmark.lit,2003:entry-32397</id>
> <published>2003-12-13T18:30:02Z</published>
> <updated>2003-12-13T18:30:02Z</updated>
> </entry>
> </item>
> </items>
> </event>
> </message>
> <message from='pubsub.shakespeare.lit' to='bard@shakespeare.lit' id='fez'>
> <event xmlns='http://jabber.org/protocol/pubsub#event'>
> <items node='princely_musings'>
> <item id='ae890ac52d0df67ed7cfdf51b644e901'>
> <entry xmlns='http://www.w3.org/2005/Atom'>
> <title>Soliloquy</title>
> <summary>
> To be, or not to be: that is the question:
> Whether 'tis nobler in the mind to suffer
> The slings and arrows of outrageous fortune,
> Or to take arms against a sea of troubles,
> And by opposing end them?
> </summary>
> <link rel='alternate' type='text/html'
> href='http://denmark.lit/2003/12/13/atom03'/>
> <id>tag:denmark.lit,2003:entry-32397</id>
> <published>2003-12-13T18:30:02Z</published>
> <updated>2003-12-13T18:30:02Z</updated>
> </entry>
> </item>
> </items>
> </event>
> </message>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Updated: (VYSPER-54) Publish to a node (XEP-0060 7.1)
Posted by Michael Jakl <ja...@gmail.com>.
Hi!
On Sun, May 31, 2009 at 23:40, Michael Jakl (JIRA) <ji...@apache.org> wrote:
> Michael Jakl updated VYSPER-54:
> -------------------------------
>
> Attachment: VYSPER-54.1.patch
>
> Full patch against rev778637 (including patches from VYSPER-53).
Bernd, for sending the event message to all subscribers, which method
should I use? Is there a helper/util which takes a from, to, and
message object? See LeafNode.java "sendMessageToSubscriber" (starts at
line 102).
Currently I'm using the StanzaRelay's "relay" method, but I'm not
entirely sure this is the right method for my task? My tests are
working, and the messages get relayed (at least the counter gets
increased), but I haven't found an easy way to ensure that the stanza
is sent correctly? What's the difference betw. StanzaWriter and Relay?
Thanks,
Michael