Can someone explain what purpose do ID's serve in some of XMPP XML requests (talking about core XMPP)?
For example, I can fetch roster by sending this request:
<iq type="get">
<query xmlns="jabber:iq:roster"></query>
</iq>
But I can also fetch it by adding a random ID:
<iq type="get" id="2346543">
<query xmlns="jabber:iq:roster"></query>
</iq>
Is there a reason as to why should or shouldn't I use ID's? Is it security related? Are there any drawbacks? What is the convention about ID's and how should they be constructed?