AMP + Message Archiving

Mauricio Giacomello
Added about 2 years ago

Hi guys, me here again.

Now with a question related to AMP working together with Message Archiving.

So, our current issue is that Message Archiving is storing AMP notification stanzas. We don't know if this is a expected behavior, something configurable or an issue.

Current scenario:

1 - We send a message from A to B, both in the same Tigase Server. Stanza:

<message xmlns="jabber:client" id="gXd79-72" time="1487795805691" type="chat" to="" from="">
    <body>Quis dolorum nam quia.这यहこน이Эéç</body>
    <request xmlns="urn:xmpp:receipts"/>
    <amp xmlns="">
        <rule value="direct" action="notify" condition="deliver"/>
        <rule value="stored" action="notify" condition="deliver"/>
        <rule value="none" action="error" condition="deliver"/>

2 - User A receives the AMP status notification. Stanza:

<message xmlns="jabber:client" id="gXd79-72" time="1487795805677" type="chat" to="" from="">
    <body>Quis dolorum nam quia.这यहこน이Эéç</body>
    <request xmlns="urn:xmpp:receipts"/>
    <amp xmlns="" to="" from="" status="notify">
        <rule value="direct" action="notify" condition="deliver"/>

3 - User B receives me message. (same as #1)

4 - Query message archive Database and we see 3 stanzas (2 messages + AMP response) when we were expecting to see only 2 (inbound and outbound).

5 - Request message archive between A and B (from A) and we see duplicated messages, when expecting to see only 1.

Our init properties look like this:


# Configurations for tigase user database

# Configurations for chat service audit database

# Configurations for AuthRepository
# We don't need to configure '--auth-db-uri' because we don't have an authentication database

# Configurations for Message Archive

# Configurations for dynamic roster

# Install SASL External Mechanism

# The plugins which are enabled

# The Components which are enabled

# Configuration for BOSH

# Certificate Directory

# Setting to enable AMP between users who are not in rosters

Versions: Tigase 7.1, Message Archiving 1.2;

Thanks in advance,

Mauricio Giacomello.

Replies (2)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

Message Archive is designed to archive any <message/> with <body/> element and in it. And it does so, it archives incoming message with AMP status notification, why it should not archive this incoming message? Only because it is AMP notifcation?

It is possible to reconfigure processor using sess-man/plugins-conf/message-archive-xep-0136/msg-archive-paths[s] however it is not possible to skip AMP notification message as there is now way to identify this kind of message using only XML path and XMLNS of element at provided path.

Added by Mauricio Giacomello about 2 years ago

Thanks of the quick response Andrzej.

We were expecting this response and we are considering modifying the class that filters the messages to fit our use case, by filtering-out messages with amp extension containing status attribute (amp notification)

+We're happy to contribute back to the project+ if you think this something you would like to have, maybe configurable?

Thanks in advance,

Mauricio Giacomello.