powered by Jive Software

Sending Bulk group messages at once resulted in openfire error code 400 and type wait

When trying to send group chat messages in a bulk resulting in a following error. It is not consistent. Please suggest the solution.

Request

<message companyName="Digital Tech" displayname="App Manager" from=ktmanager@demo.com id="0cdef4b2-969d-40cd-be39-b6253384bb8d:normal" sensorList="{&quot;data&quot;:[]}" sensorValue="{}" to="119_98_95_99_104_97_116_105_100_95_115_97_109_112_108_101_119_101_108_108_50_102_111_114_110_101_119_117_115_101_116_101_115_116_49_48_48_101_99_54@conference.demo.com" type="groupchat" xmlns="jabber:client"><body>type:Exit&amp;GroupId:119_98_95_99_104_97_116_105_100_95_115_97_109_112_108_101_119_101_108_108_50_102_111_114_110_101_119_117_115_101_116_101_115_116_49_48_48_101_99_54</body></message>

<presence from=ktmanager@demo.com groupexited="true" groupexitjid=ktmanager@demo.com to="119_98_95_99_104_97_116_105_100_95_115_97_109_112_108_101_119_101_108_108_50_102_111_114_110_101_119_117_115_101_116_101_115_116_49_48_48_101_99_54@conference.demo.com/ktmanager" type="unavailable" xmlns="jabber:client"/>

Response

<message xmlns="jabber:client" companyName="Digital Tech" displayname="App Manager" from="119_98_95_99_104_97_116_105_100_95_115_97_109_112_108_101_119_101_108_108_50_102_111_114_110_101_119_117_115_101_116_101_115_116_49_48_48_101_99_54@conference.demo.com" id="0cdef4b2-969d-40cd-be39-b6253384bb8d:normal" sensorList="{&quot;data&quot;:[]}" sensorValue="{}" to=ktmanager@demo.com/17gnq41014 type="error"><body>type:Exit&amp;GroupId:119_98_95_99_104_97_116_105_100_95_115_97_109_112_108_101_119_101_108_108_50_102_111_114_110_101_119_117_115_101_116_101_115_116_49_48_48_101_99_54</body><stanza-id xmlns="urn:xmpp:sid:0" id="70d77222-453d-411a-8c1a-b99e2d0110b4" by="119_98_95_99_104_97_116_105_100_95_115_97_109_112_108_101_119_101_108_108_50_102_111_114_110_101_119_117_115_101_116_101_115_116_49_48_48_101_99_54@conference.demo.com"/><error code="406" type="modify"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">You are not in the room.</text></error></message>

<presence xmlns="jabber:client" from="119_98_95_99_104_97_116_105_100_95_115_97_109_112_108_101_119_101_108_108_50_102_111_114_110_101_119_117_115_101_116_101_115_116_49_48_48_101_99_54@conference.demo.com/ktmanager" groupexited="true" groupexitjid=ktmanager@demo.com to=ktmanager@demo.com/17gnq41014 type="error"><error code="400" type="wait"><unexpected-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Unexpected stanza type: unavailable</text></error></presence>

I have solved it using following approach.

Issue : Let say i have joined 40 groups. Refresh the screen. Try to send message to each group.I was getting above error from open fire.

Solution: Send presence to each group before sending message solved the above error.