[Standards-JIG] JEP-0079 (AMP): conditions reversed?

Ralph Meijer jabber.org at ralphm.ik.nu
Tue May 31 10:57:16 UTC 2005


I was thinking about using AMP in combination with pubsub, and thus
started reading the AMP JEP carefully. Take the following example taken
from section 5.1 (indented):

    The <message/> stanza is nearly ideal for data transport, but to ensure
    reliability it is often desirable that such messages not be delivered to
    any resource but that specified. To facilitate this, the sending entity
    includes a <rule action='drop' condition='match-resource'
    value='exact'/> (if failure notification is unnecessary) or <rule
    action='error' condition='match-resource' value='exact'/> (if failure
    notification is required). The following example illustrates this using
    In-Band Bytestreams [9]:

    Example 10. Sending a message for reliable data transport

    <message to='francisco at hamlet.lit/pda'
	     from='bernardo at hamlet.lit/elsinore'
	     id='ibb1'>
      <data xmlns='http://jabber.org/protocol/ibb' sid='mySID' seq='0'>
	qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
	WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
	IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
	AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
	kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
      </data>
      <amp xmlns='http://jabber.org/protocol/amp' per-hop='true'>
	<rule condition='expire-at' value='2004-09-10T08:33:14Z'
    action='error'/>
	<rule condition='match-resource' value='exact' action='error'/>
      </amp>
    </message>
	

    In the above case, the sender would receive an error reply if the
    message could not be delivered specifically to
    "francisco at hamlet.lit/pda" within 500 seconds.

    Example 11. Failed reliable data transport message

    <message from='hamlet.lit'
	     to='bernardo at hamlet.lit/elsinore'
	     id='ibb1'>
      <data xmlns='http://jabber.org/protocol/ibb' sid='mySID' seq='0'>
	qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
	WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
	IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
	AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
	kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
      </data>
      <amp xmlns='http://jabber.org/protocol/amp'
	  from='bernardo at hamlet.lit/elsinore'
	  to='francisco at hamlet.lit/pda'>
	<rule condition='match-resource' value='exact' action='error'/>
      </amp>
      <error type='modify' code='500'>
	<undefined-condition xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
	<failed-rules xmlns='http://jabber.org/protocol/amp#errors'>
	  <rule condition='match-resource' value='exact' action='error'/>
	</failed-rules>
      </error>
    </message>

As I see it, the condition match-resource, using the value 'exact',
would only match if the resource *did* match. So, if it could be
delivered, the message would get dropped?

Also, what happens in the case when the default action is offline
storage? Does the resource still match?

I think only the expire-at condition is correctly defined, and that the
others should be reversed in their meaning.

-- 
Groetjes,

ralphm



More information about the Standards mailing list