%ents; ]>
MUC Eventing Protocol This specification defines semantics for using the XMPP publish-subscribe protocol to broadcast state change events associated with a Multi-User Chat (MUC) room. This profile of pubsub therefore enables a chatroom to function as a virtual pubsub service, easing the discovery of syndicated data and event notifications associated with such a room. &LEGALNOTICE; 0316 Experimental Standards Track Standards JIG Council XMPP Core XMPP IM XEP-0030 XEP-0045 XEP-0060 XEP-0115 mep &stpeter; 0.1 2013-01-03 psa

Initial published version approved for publication by the XMPP Council.

0.0.2 2012-12-09 psa

Added description of occupant publishing.

0.0.1 2012-12-06 psa

First draft.

Just as &xep0163; defines a profile of &xep0060; that enables an instant messaging user to send updates or "events" to other users, this specification defines a profile that enables a room occupant or the chatroom itself to send notifications in the context of &xep0045; chatroom.

Note: Any use cases, error flows, and other protocols details not described herein are described in XEP-0060. This document merely defines a "subset" or "profile" of XMPP publish-subscribe.

Using the chatroom example from XEP-0045, imagine that the room itself wants to notify the occupants of the coven@chat.shakespeare.lit chatroom about events of interest to the group (say, notifications about multimedia aspects of the multi-user session, such as described in &xep0298;).

When new information is available about the multimedia session (say, calling into a conference "bridge" or starting a &xep0166; session to add a video feed), a multimedia engine might capture that event and inform the chatroom by means of a backend API. The chatroom itself then generates an event notification. That is, a chatroom does not publish events, instead it simply generates them based on data of interest. As a result, everyone in the room who is interested in that kind of data will receive a notification about the event:

video sendonly video sendonly ]]>

But how do the occupants tell the room that they are interested in knowing what about conference-info events? Whereas generic pubsub services require an explicit subscription to a conference-info node, MEP services support the "filtered-notification" feature from XEP-0060 and obviously share presence (since MUC is based on directed presence in the room) so the "auto-subscribe" feature also applies.

]]>

That chatroom knows to send conference-info notifications to crone1@shakespeare.lig because when the room unpacks the value of the 'ver' attribute ("054H4A7280JuT6+IroVYxgCAjZo=") in accordance with XEP-0115, it discovers that her client advertises a service discovery feature of "urn:ietf:params:xml:ns:conference-info+notify", where the "+notify" suffix indicates interest in receiving notifications related to the protocol that precedes the suffix. The server can verify this support if needed by sending a service discovery request to crone1's full JID (see XEP-0115 for details).

The foregoing section described how the room itself can inform the occupants about data of interest. However, in MEP any particular occupant can also publish information. An occupant does so by sending a publish-subscribe publish request to the occupant's Occupant JID <room@service/nick> (similar to the way in which publishing via PEP happens by sending a request to the user's bare JID <user@host>). For instance, the following example shows how a room occupant would inform the other occupants about an event of interest.

I'll give thee a wind. ]]>

Note: Publishing to an occupant's MEP node happens by sending an explicit publish request to the Occupant JID. Publishing to a user's PEP node MUST NOT trigger a MEP publish request, because PEP and MEP are separate pubsub contexts.

As a result, everyone in the room who is interested in that kind of data will receive a notification about the event (note that even the publisher receives the event, if they have advertised interest in the payload type):

I'll give thee a wind. I'll give thee a wind. ]]>

MUC eventing via pubsub ("MEP") is based on the following principles:

  1. Every room JID and occupant JID a pubsub service.
  2. One publisher per node (the chatroom or occupant itself).
  3. Use presence (implicit in multi-user chat).
  4. Filter notifications based on expressed interest.
  5. Smart defaults.

These principles are described more fully below.

Treating every MEP-enabled chatroom as a pubsub service simplifies the task of discovering and subscribing to information of interest in or about the room.

There is no need for multiple publishers to a MEP service, since by definition only the chatroom itself or the occupant itself publishes information.

By definition, a chatroom has presence information about the occupants, because they use directed presence to join the room.

Note: It is strongly NOT RECOMMENDED to use directed presence with Entity Capabilities data that differs from the data included in broadcast presence for the purpose of establishing implicit PEP subscriptions to another entity, because the directed presence information will be overwritten by any subsequent presence broadcast.

By default, the use of directed presence is used to establish a MEP subscription to the chatroom's eventing data. In order to filter which notifications are sent by the MEP service, the contact's client includes extended &xep0115; information in the directed presence notifications it sends to the chatroom. Because the MEP-enabled room supports the "filtered-notifications" feature, it sends only those notifications that match the occupant's expressed notification preferences.

Most pubsub configuration options and metadata are not needed for MUC eventing. Instead, MEP services offer smart defaults to simplify node creation and management.

A MEP service MUST:

A PEP service MAY support other use cases, affiliations, access models, and features, but such support is OPTIONAL.

If a chatroom supports MEP, it MUST advertise that fact in its responses to &xep0030; information ("disco#info") requests by returning an identity of "pubsub/mep" and the relevant pubsub features:

]]> ... ... ]]>

The security considerations of XEP-0045 and XEP-0163 apply.

This document requires no interaction with &IANA;.

The ®ISTRAR; includes a category of "pubsub" in its registry of Service Discovery identities (see &DISCOCATEGORIES;); as a result of this document, the Registrar includes a type of "pep" to that category.

The registry submission is as follows:

pubsub mep A MUC eventing service that supports the publish-subscribe subset defined herein. XEP-0316 ]]>

Because MEP simply reuses the protocol specified in XEP-0060, a separate schema is not needed.

Thanks to Joe Hildebrand, Matt Miller, and Matthew Wild for their input.