Solution
Prev | Chapter 31. Mobile Optimizations | Next

## Solution

When mobile client is entering inactive state it notifies server about it by sending following stanza:

    <iq type="set" id="xx">
    <mobile
      xmlns="http://tigase.org/protocol/mobile#v3"
      enable="true"/>
    </iq>

After receiving stanza server starts queueing stanza which should be send to mobile client. Kind of queued stanzas depends on used plugin and in case of Mobile v3 presence stanzas are queued as well as message stanzas which are Message Carbons. Any other stanza (such as iq or plain messenge) is sent immediately to the client and every stanza from queue is also sent at this time.

When mobile client is entering active state it notifies server by sending following stanza:

    <iq type="set" id="xx">
    <mobile
      xmlns="http://tigase.org/protocol/mobile#v3"
      enable="false"/>
    </iq>

After receiving stanza server sends all queued stanzas to the client.

Also all stanzas from queue will be sent if number of stanzas in queue will reach queue size limit. By default this limit is set to 50.

Prev | Up | Next
Chapter 31. Mobile Optimizations | Home | Queueing Algorithms