Project

General

Profile

How can I query the archived message while the version of tigase is 7.2.0-SNAPSHOT?

Wei Sun
Added over 1 year ago

I have installed the component of tigase-message-archiving, the messages can be saved in the database.

if the xmpp_client wants to query the the archived message, what stanza should the client send when the version of tigase is 7.2.0-SNAPSHOT?

I refer to the User_Guide and send the following stanza to server, but nothing to response:

<iq type="get" id="query2">
    <list xmlns='urn:xmpp:archive'
        with='juliet@capulet.com'
        from='2014-01-01T00:00:00Z'
        end='2014-05-01T00:00:00Z'>
          <query xmlns="http://tigase.org/protocol/archive#query">
              <contains>test failed</contains>
          </query>
    </list>
</iq>

Replies (3)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 1 year ago

I've just tested message archiving and it works fine - I'm getting proper responses.

Do you get any response or none? Which build are you using? Can you attach your configuration file?

And please check for any errors or exceptions in logs of Tigase XMPP Server.

Added by Wei Sun over 1 year ago

when I use the following stanza,the response is nothing.

<iq type="get" id="query2">
    <list xmlns='urn:xmpp:archive'
        with='juliet@capulet.com'
        from='2017-04-20T01:00:00Z'
        end='2017-04-22T23:00:00Z'>
          <query xmlns="http://tigase.org/protocol/archive#query">
              <contains>test failed</contains>
          </query>
    </list>
</iq>

however,with a element like this :

<iq type="get" id="query2">
    <retrieve xmlns='urn:xmpp:archive'
        with='juliet@capulet.com'
        from='2017-04-20T01:00:00Z'
        end='2017-04-22T23:00:00Z'>
          <query xmlns="http://tigase.org/protocol/archive#query">
              <contains>test failed</contains>
          </query>
    </retrieve>
</iq>

I got the exceptions like this :

java.lang.NullPointerException
        at tigase.archive.xep0136.modules.RetrieveItemsModule.getMessages(RetrieveItemsModule.java:100)
        at tigase.archive.xep0136.modules.RetrieveItemsModule.process(RetrieveItemsModule.java:74)
        at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:56)
        at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:77)
        at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:102)
        at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1503)

and my init.properties file:

message-archive (class: tigase.archive.MessageArchiveComponent, active:true) {
}
sess-man (class: tigase.server.xmppsession.SessionManager) {
    message-archive-xep-0136 (class: tigase.archive.processors.Xep0136MessageArchivingProcessor,active: true) {
       plugins-conf(){
           message-archive-xep-0136(){
           component-jid = message-archive@serverName
           required-store-method = body
           }
       }
    }
}

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 1 year ago

How you created this configuration and which build of Tigase XMPP Server are you using?

I'm asking as config should look like this:

message-archive (class: tigase.archive.MessageArchiveComponent, active:true) {
}
sess-man (class: tigase.server.xmppsession.SessionManager) {
    message-archive-xep-0136 (class: tigase.archive.processors.Xep0136MessageArchivingProcessor) {
        required-store-method = body
    }
}

    (1-3/3)