Projects tigase _server server-core Issues #1371
When the message delivery rules are strict, the offline messages are not stored in the database (#1371)
Unknown opened 5 years ago

the config.tdsl:

'sess-man' () {
    amp {
        'delivery-rules' = 'strict'
    }
}

So i found the reason by debugging, such as: WX20191125-155613@2x

the class: MessageAmp, the method: postProcess, the line: 96, such as:

if (packet.getElemName() == tigase.server.Message.ELEM_NAME && packet.getStanzaTo() != null && packet.getStanzaTo().getResource() != null) {
	return;
}
Unknown commented 5 years ago

You configured strict delivery rules, therefore we are following Message delivery rules to the dot:

For a message stanza of type "normal", "groupchat", or "headline", the server MUST either (a) silently ignore the stanza or (b) return an error stanza to the sender, which SHOULD be .

You can try setting message type to chat

Unknown commented 5 years ago

The type of message was chat. But the message was not stored in the database.

Unknown commented 5 years ago

The from of message was xxx@yyy/pc, and the to of the message was bbb@yyy/phone,

Unknown commented 5 years ago

The toJid of the message was a full JID, such as: JID fromJid = JID.jidInstance("A", "xmpp.server"); JID toJid = JID.jidInstance("B", "xmpp.server", "phone");

So, when the client B was offline, i need the message was stored in the tig_offline_message with resource.

Because the message would not be handled within some client, such as pc, some client (such as phone) would handle the message.

However, when the phone client was not online, the message would be stored in the tig_offline_message. The message would resent to the phone client until the phone client was online.

Unknown commented 5 years ago

Thank you for the detailed description. We will investigate it further and let you know the outcome.

Unknown commented 5 years ago

As the linked specification says:

For a message stanza of type "chat":

  • If there is no available or connected resource, the server MUST either (a) store the message offline for later delivery or (b) return an error stanza to the sender, which SHOULD be .

For the strict configuration we opted for the (b) option. If you want messages stored for offlien delivery you should use inteligent configuration of 'delivery-rules'

Unknown commented 5 years ago

For inteligent configuration, it was possible that the message would resent the pc client without handling the message, when the pc client was online. However, the pc client did not handle the message, so the message would be lost. But i just wanted the phone client handled the message. So, how can i solve it? Thanks a lot!

Unknown commented 5 years ago

Best way to handle it would be to use both/or any of the:

issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1371
Please wait...
Page is in error, reload to recover