Retrieving archive messages using openfire monitoring plugin

六月ゝ 毕业季﹏ 提交于 2019-11-29 09:18:35

问题


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 collection, the server response is an error iq stanza.

This is the request

<iq type='get' id='user13' xmlns='jabber:client'>
   <list xmlns='urn:xmpp:archive' with='b31315847fed0d6728d5fb763e4a53b09d6fb549@user-pc'>
     <set xmlns='http://jabber.org/protocol/rsm'>
        <max>
          10
        </max>
     </set>
   </list>
</iq>

And this is the server response :

<iq xmlns='jabber:client' type='error' id='user13' to='dff4bb27259100a5b158ba2477037da823d54229@user-pc/68154bb7'>
    <error code='501' type='cancel'>
        <feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    </error>
</iq>

When I take a look at openfire admin console, I can view the archived conversations, so I expect my request to work fine, which is not the case.

What's going on?


回答1:


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



来源:https://stackoverflow.com/questions/19454587/retrieving-archive-messages-using-openfire-monitoring-plugin

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!