On Fri, Oct 4, 2013 at 6:09 PM, Todd Herman <[email protected]> wrote:
> > > However, when the management component needs to forward the > > information on, it needs the full jid to send the IQ too. How do I find > this full > > jid? How do I determine the resource being used by a particular user in > order > > to deliver my Iq. This is a push based system so I can't rely on an > incoming > > message from the client and get the full jid that way. > > > > Use presence. It will also tell you when a consuming client is online, > so you > > don't send things to offline storage. > > I thought of using presence but I thought presence only provides the bare > jid. > Presence provides you with the full JIDs of all the contact's sessions. This should be fairly clear in RFC6121 - the book also covers stuff like this in a hopefully readable manner, and reading that for an overview of how stuff works might be a reasonable start, but trying to do any protocol work without reference to the spec is likely to be painful. > > > Under the rules you guys pointed me to, IQs don't work if more than one > > resource is on line. > > > > Well, <iq/> to the bare jid will be handled by the recipients server. It > will not > > be forked to the clients like <message/>, not even if there is only one > client > > connected. > > I could be reading this totally wrong but RFC 6121 (section 8.5.2.1.3) > says that when sending IQs using a bare jid, the server should either > handling it itself (which it can't) or respond with a "service-unavailable" > error. That section doesn't seems to only apply in cases where there are > multiple resources for that recipient. I assume the IQ is delivered > normally if there is only one resource. For the record, this will mainly > run in an environment with a single server. That is why I need to find out > what the resource is so I can attempt to deliver the IQ directly to that > user. > The IQ routing rules apply whether there are zero, one or multiple available resources (and note that available resources are not necessarily the same as resources). For bare JID, the server handles it, for full JID it is routed to the client where able. You seem to be replying to a mail that had the context of what you're trying to do, but I can't find such a thing. What're you trying to achieve? /K
