reported at: http://www.igniterealtime.org/community/thread/38876
"...When I add from Example-app user2 to user1's roster, after I click accept in spark (to accept the subscription), Example-app keeps on getting presence subscribe requests from server, and my processor is 100% busy..."
"Looking at the RFC, i think openfire is incorrectly not ignoring the last subscribed message.
9. Upon receiving the presence stanza of type "subscribed", the user
SHOULD acknowledge receipt of that subscription state
notification through either "affirming" it by sending a presence
stanza of type "subscribe" to the contact or "denying" it by
sending a presence stanza of type "unsubscribe" to the contact;
this step does not necessarily affect the subscription state (see
Subscription States (Section 9) for details), but instead lets
the user's server know that it MUST no longer send notification
of the subscription state change to the user (see Section 9.4).
When openfire gets this affirmation "subscribe", it starts the subscribe process over again instead of ignoring the response."
"Looking at the code and the rfc http://xmpp.org/rfcs/rfc3921.html#roster
I think the issue is in the PresenceSubscribeHandler line 141 where it auto-delivers a "subscribed" packet if the user is already subscribed to a roster. I don't think it should do this because it will break number 9 in the rfc under roster, where it the client sends out the "subscribe" to an already subscribed contact and the server eats it."