Discovery
As with all other parts of XMPP, if we want to discover and find information about a pubsub
provider, we use our old friend (by now, right?) DISCO
. Pubsub systems will often sit on their own domain under an XMPP server domain (often running as a component; more on that in the next chapter).
To discover a pubsub
system, Marty would run a DISCO#items
query against the parent domain and see what was available:
<iq type='get' id='query1' from='marty@mcfly.fam/street' to='hill.valley'> <query xmlns='http://jabber.org/protocol/disco#items'/> </iq>
The server then responds with a set of items that it's hosting:
<iq type='result' id='query1' from='hill.valley' to='marty@mcfly.fam/street'> <query xmlns='http://jabber.org/protocol/disco#items> <item jid='pubsub.hill.valley'/> <item jid='chat.hill.valley'/> <item jid='identity.hill.valley'/> </query>...