I was recently working on a web application that uses Strophe.js (http://strophe.im/strophejs/) behind Candy (http://candy-chat.github.com/candy/). The client gets a 404 from ejabberd due to invalid rid issue when it sends messages too fast. The same error occurs at random times as well.
After some research I figured out that this is due to invalid rid issue and it is happening because ideally client-side js should wait for server response before pushing a new stanza while it does not in some cases.
From my point of view this should be ensured by Strophe.js at low level rather than the application programmer. Please tell me how should I proceed to fix this problem? I could not find solution to this problem on Google.