%ents; ]>
PubSub Queueing This specification defines an extension to XMPP publish-subscribe for queueing information at a node. &LEGALNOTICE; 0254 Deferred Standards Track Standards Council XMPP Core XEP-0060 NOT_YET_ASSIGNED &hildjj; &stpeter; 0.1 2008-11-13 psa

Initial published version.

0.0.3 2008-10-07 jjh/psa

Added more detailed error flows; added additional implementation notes.

0.0.2 2008-10-07 jjh/psa
  • Specified that notifications are sent to only one subscriber at a time.
  • Specified that notifications include payloads.
  • Added protocol extension for unlock feature.
  • Modified namespace to incorporate namespace versioning.
0.0.1 2008-08-14 psa/jjh

First draft.

The &xep0060; extension to XMPP provides a comprehensive technology for alerts, notifications, data syndication, rich presence, and other real-time messaging use cases. In terms of traditional publish-subscribe systems like Java Message Service (JMS), the core XMPP PubSub specification covers the Observer design pattern only; however, traditional publish-subscribe systems often include support for a second design pattern, usually called the "point-to-point" or "queueing" pattern. See for instance <http://en.wikipedia.org/wiki/Java_Message_Service>. This specification defines a few small extensions to XMPP PubSub that enable support for a queueing mode in XMPP. The queueing mode is an add-on feature that a service can support, and that a node owner can enable if supported by the service. The feature name is "urn:xmpp:pubsub:queueing:0".

If a node has enabled support for the queueing mode, in response to a subscription request without configuration options it MUST return an IQ-error containing a subscription options form; this form MUST include the "queue_requests" field (which specifies the number of parallel requests a subscriber is willing to process).

http://jabber.org/protocol/pubsub#subscribe_options ]]>

The subscriber would then send a new subscription request, this time with options.

http://jabber.org/protocol/pubsub#subscribe_options 5 ]]>

If the subscription request can be processed successfully, the service returns an IQ-result and includes the configuration options established during the negotiation.

http://jabber.org/protocol/pubsub#subscribe_options 5 ]]>

At any time, a publisher can push an item to the queue node.

payload ]]>

The item is published to one of the subscribers.

payload ]]>

When the subscriber that received the item has successfully processed it (whatever that means in the context of the queue), the subscriber deletes the item from the queue.

]]>

In the context of a queue node, the service MUST treat a delete request from a subscriber that received the item as if the sender were a publisher; i.e., it MUST delete the item from the queue and notify only this subscriber that the item has been deleted.

]]>

Note: The subscriber SHOULD NOT commit any pending transactions until it receives the delete notification.

If the item does not exist, the service MUST return an ¬found; error as described in XEP-0060.

If the entity that attempts to delete the item is not the subscriber that received the item, the service MUST return a &forbidden; error as described in XEP-0060.

If the item is locked by another subscriber, the service MUST return a &conflict; error (this flow is not defined in XEP-0060.

]]>

If the subscriber that received the item attempts to delete the item but the item is no longer locked by the subscriber (e.g., because of a race condition or a lost notification), the service MUST return an &unexpected; error (this flow is not defined in XEP-0060.

]]>

The subscriber might determine that it cannot process the item (whatever that means in the context of the queue); if so, the subscriber unlocks the item.

]]>

The service then MUST unlock the item and notify only this subscriber that the item has been unlocked.

]]>

When an item is unlocked, the service would then send a publish notification to another subscriber according to application-specific logic for determining the "next" subscriber.

If the item does not exist, the service MUST return an ¬found; error.

]]>

If the entity that attempts to unlock the item is not the subscriber that received the item, the service MUST return a &forbidden; error.

]]>

If the item is locked by another subscriber, the service MUST return a &conflict; error.

]]>

If the subscriber that received the item attempts to unlock the item but the item is no longer locked by the subscriber (e.g., because of a race condition or a lost notification), the service MUST return an &unexpected; error.

]]>

If a pubsub service supports the queueing mode, it MUST advertise support for the "urn:xmpp:pubsub:queueing:0" namespace in response to &xep0030; information requests.

If the service receives unavailable presence from a subscriber, it SHOULD unlock all outstanding queue items associated with the subscriber and unsubscribe the subscriber to prevent delivery of further publish notifications.

If a subscriber cannot process queue items because of an unrecoverable error (e.g., disk full), the subscriber SHOULD unsubscribe and then unlock all of its outstanding queue items.

If the service does not receive a delete or unlock request from a subscriber that received a queue item in a configurable amount of time, it SHOULD timeout the request, send an unlock notification to the subscriber, and send a publish notification to the "next" subscriber.

To follow.

This document requires no interaction with &IANA;.

This specification defines the following XML namespace:

  • urn:xmpp:pubsub:queueing:0

Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespaces to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.

&NSVER;

The ®ISTRAR; maintains a registry of service discovery features (see &DISCOFEATURES;), which includes a number of features that can be returned by pubsub services. The following registry submission supplements the existing list.

urn:xmpp:pubsub:queueing:0 The node or service supports the queueing mode. XEP-xxxx ]]>