I use XMPP with openfire server for my website im. I\'ve enabled monitoring service plugin, so I can archive messages.
When I send an iq stanza to retrieve a collect
Your stanza is correct. But the plugin seems not working.
Openfire Monitoring plugin isn't designed for message archiving. The main purpose of this plugin is for traffic statistic logging & monitoring.
You can take a look on Monitoring Plugin readme page. Message archiving has just added in version 1.3. The message are saved but it's just for logging & monitoring purpose.
I've tried this plugin too & I can't retrieve message history by this plugin.
As a solution, you can install OpenArchive plugin rather than Openfire Monitoring plugin. This plugin is specified for message archiving & retrieval.
I've install OpenArchive 1.6 & it works for me.
My reference: http://community.igniterealtime.org/message/227791#227791