Stream management, mod_mam and mod_offline usage

I configure ejabberd 16.08 with stream management, mod_mam and mod_offline:

......
stream_management: true
    resume_timeout: 10
    resend_on_timeout: if_offline
.....
mod_offline:
    access_max_user_messages: max_user_offline_messages
    db_type: mnesia
...........
mod_mam:
    iqdisc: one_queue
    default: always
    db_type: mnesia
    request_activates_archiving: false
    assume_mam_usage: on_request
    cache_life_time: 10
..............

I have this situation:

1. Mobile client "A" closes Application.
2. XMPP client "B" sends to client "A" the message before "Waiting for resumption of stream for" client "A"
3. Client B receives error:

Send XML on stream = <<"<message from='B' to='A' type='error' id='BGprO-86'><archived by='HOST' xmlns='urn:xmpp:mam:tmp' id='1471439629018142'/><stanza-id by='HOST' xmlns='urn:xmpp:sid:0' id='1471439629018142'/><body>Sgkatjatjbbb</body><thread>Qwoa65gXn0aA</thread><active xmlns='http://jabber.org/protocol/chatstates'/><request xmlns='urn:xmpp:receipts'/><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>User session terminated</text></error></message>">>

Is it possible to store this message at server in offline storage?

According to faq(

According to faq( https://www.ejabberd.im/faq/tcp ) I have to set option resend_on_timeout to true or if_offline. I tried it. Previous result.
Any help?

A User session terminated

A User session terminated error is definitely not returned for any message stanza if resend_on_timeout is set to true. So this option is not actually set for the c2s listener you're using, but I can't tell you why. Either it's specified in the wrong place, or there's a typo, or ejabberd wasn't restarted after modifying the option, or something like that.

In web console ejabberd for

In web console ejabberd for ejabberd_c2s module(port 5222) options are :

[{resend_on_timeout, if_offline},
{resume_timeout, 30},
{stream_management, true},
{access, c2s}, {shaper, c2s_shaper},
{max_stanza_size, 65536},
{starttls_required, true},
{starttls, true},

So, this means that options specified in the true place, there are no typo and ejabberd was restarted.
Am I right?

Syndicate content