Configuration Ejabberd似乎忽略了在超时时重新发送

Configuration Ejabberd似乎忽略了在超时时重新发送,configuration,yaml,ejabberd,stream-management,Configuration,Yaml,Ejabberd,Stream Management,我是Ejabberd的新手,我一直在尝试对其进行配置,以使其能够根据以下建议对连接丢失进行强健处理: 默认情况下,流管理处于激活状态(我使用ejabberd 15.07),我在ejabberd.yml中将“在超时时重新发送”设置为true: listen: - port: 5222 module: ejabberd_c2s resend_on_timeout: true max_stanza_size: 65536 shaper: c2s_shap

我是Ejabberd的新手,我一直在尝试对其进行配置,以使其能够根据以下建议对连接丢失进行强健处理: 默认情况下,流管理处于激活状态(我使用ejabberd 15.07),我在ejabberd.yml中将“在超时时重新发送”设置为true:

listen: 
  - 
    port: 5222
    module: ejabberd_c2s
    resend_on_timeout: true
    max_stanza_size: 65536
    shaper: c2s_shaper
    access: c2s
    starttls: true
    certfile: "/Applications/ejabberd-15.07/conf/server.pem"
并且mod_offline被激活:

mod_offline: 
  access_max_user_messages: max_user_offline_messages
此外,管理员web界面确认在超时时重新发送\u设置为true:

[{certfile,
  <<47, 65, 112, 112, 108, 105, 99, 97,
    116, 105, 111, 110, 115, 47, 101,
    106, 97, 98, 98, 101, 114, 100, 45,
    49, 53, 46, 48, 55, 47, 99, 111,
    110, 102, 47, 115, 101, 114, 118,
    101, 114, 46, 112, 101, 109>>},
 {starttls, true}, {access, c2s},
 {shaper, c2s_shaper},
 {max_stanza_size, 65536},
 {resend_on_timeout, true}]
[{certfile,
},
{starttls,true},{access,c2s},
{shapper,c2s_shapper},
{max_stanza_size,65536},
{在_超时时重新发送_,true}]
不幸的是,以下场景无法按预期工作:

  • 用户a和用户b连接到ejabberd
  • 用户_b告诉Ejabbrd他实现了
  • 用户未正确断开与Ejabberd的连接就松开了连接
  • 用户_a向用户_b发送消息“测试消息”
  • Ejabberd检测到用户_b未确认该消息

    2015-09-04 00:30:49.869 [info] <0.458.0>@ejabberd_c2s:handle_unacked_stanzas:2877 1 stanzas were not acknowledged by user_b@localhost/7952730381441319317654314
    
    2015-09-04 00:30:49.869[信息]@ejabberd_c2s:handle_unacked_节:2877 1节未被用户确认_b@localhost/7952730381441319317654314
    
  • Ejabberd向用户_a发送错误消息,而不是为用户_b脱机存储该消息

    2015-09-04 00:30:49.870 [debug] <0.467.0>@ejabberd_c2s:send_text:1901 Send XML on stream = <<"<message from='user_b@localhost/7952730381441319317654314' to='user_a@localhost/MacBook Air de Cyrille' type='error' id='8C843796-CD60-4111-8754-EBAE20A0D75E'><body>Test message</body>\n<html xmlns='http://jabber.org/protocol/xhtml-im'><body xmlns='http://www.w3.org/1999/xhtml' style='background-color:#e9e9e9;color:#000000;'><span style='font-family: &apos;Helvetica&apos;;font-size: 12px;'>Test message</span></body></html><x xmlns='jabber:x:event'><composing/></x>\n<active xmlns='http://jabber.org/protocol/chatstates'/><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></message>">>
    
    2015-09-04 00:30:49.870[调试]@ejabberd_c2s:send_text:1901在流上发送XML=>
    
  • (最后提供完整日志)

    我肯定我错过了什么,但我找不到什么。 非常感谢你的帮助

    从步骤4到步骤6的完整ejabberd日志
    2015-09-04 00:30:19.862[debug]@ejabberd\u接收器:进程\u数据:349在流中接收到XML=\n“>

    2015-09-04 00:30:19.862[debug]@shaper:update:120状态:{maxrate,1000523.88759434841031441319395776490},大小=477
    M=323.14612235512,I=24086.201
    2015-09-04 00:30:19.863[调试]@ejabberd_路由器:do_路由:323路由
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmlel,,[{,},{,},{,},{,},{xmlel,,[],[{xmlcata,},{xmlel,,[{,},{,},{,},{,},{,},{,},{,},{,},{,},{,},{,},},{xmlel,},{,},{,},{,},},{,},},{,},},},{,},{,},},},{,},},},},},},{
    2015-09-04 00:30:19.863[调试]@ejabberd_本地:do_路由:296本地路由
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmlel,,[{,},{,},{,},{,…},{xmlel,,…},{xmlcata,…},{}}{}}}}{}}}}}{}}}}
    2015-09-04 00:30:19.864[调试]@ejabberd_sm:do_路由:447会话管理器
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmlel,,[{,},{,},{,},{,…},{xmlel,,…},{xmlcata,…},{}}{}}}}{}}}}}{}}}}
    2015-09-04 00:30:19.864[调试]@ejabberd_sm:do_路由:565发送到进程
    15-10-10-09-09-09-09-09-09-09-09-09-09-09-09-09-09-04 00-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-}]}]
    2015-09-04 00:30:19.865[调试]@ejabberd_http_绑定:发送输出包:1059---传出数据--
    测试消息
    测试消息
    ---完--
    2015-09-04 00:30:30.178[调试]@ejabberd_接收器:进程_数据:349流中接收到的XML=
    2015-09-04 00:30:30.179[调试]@shaper:update:120状态:{maxrate,1000271.84566900136051441319419862845},大小=2
    M=1.1573040463605986,I=10315.866
    2015-09-04 00:30:49.865[信息]@ejabberd_http_绑定:句柄信息:522会话超时。关闭http绑定会话:
    2015-09-04 00:30:49.865[调试]@ejabberd_http_绑定:终止:558终止:删除会话4388150e84a2c3e491fb66d9ff77ae9b78492cde
    2015-09-04 00:30:49.865[信息]@ejabberd_c2s:terminate:1842({socket_状态,ejabberd_http_绑定,{http_绑定,{127,0,0,1},55272},ejabberd_http_绑定})关闭用户会话_b@localhost/7952730381441319317654314
    2015-09-04 00:30:49.866[debug]@mod_pubsub:node_action:4118 node_action get_entity_affiliations[,{,,}]
    2015-09-04 00:30:49.866[调试]@mod_pubsub:node_call:4099 node_call get_entity_affiliations[,{,,}]
    2015-09-04 00:30:49.866[debug]@mod_pubsub:node_action:4118 node_action get_entity_affiliations[,{,,}]
    2015-09-04 00:30:49.867[调试]@mod_pubsub:node_call:4099 node_call get_entity_affiliations[,{,,}]
    2015-09-04 00:30:49.867[debug]@mod_pubsub:node_action:4118 node_action get_entity_affiliation[,{,,}]
    2015-09-04 00:30:49.867[调试]@mod_pubsub:node_call:4099 node_call get_entity_affiliations[,{,,}]
    2015-09-04 00:30:49.867[调试]@mod_carboncopy:disable:249禁用
    2015-09-04 00:30:49.867[调试]@mod_共享名册:未设置状态:1104未设置@/->(0资源)
    2015-09-04 00:30:49.868[调试]@ejabberd_路由器_多播:do_路由:193路由_多播
    来自用户_b@localhost/7952730381441319317654314
    域本地主机
    目的地[]
    数据包{xmllel,,[{,}],]}
    2015-09-04 00:30:49.868[调试]@ejabberd_路由器:do_路由:323路由
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmllel,,[{,}],]}
    2015-09-04 00:30:49.868[调试]@ejabberd_本地:do_路由:296本地路由
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmllel,,[{,}],]}
    2015-09-04 00:30:49.869[调试]@ejabberd_sm:do_路由:447会话管理器
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmllel,,[{,}],]}
    2015-09-04 00:30:49.869[信息]@ejabberd_c2s:handle_unacked_节:2877 1节未被用户确认_b@localhost/7952730381441319317654314
    2015-09-04 00:30:49.869[调试]@ejabberd_路由器:do_路由:323路由
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmlel,,[{,},{,},{,},{,},{xmlel,,[],[{xmlcata,},{xmlel,,[{,},{,},{,},{,{,},{,},{xmlel,{,},{,},},{xmlel,},{,{,},{,},},{,},},{,},{,},},{,},},},{,},{,},},{,},},},{,},},{,},},{,},},},},{,},},{,},},},{,},},},},{,},},},{,},},},},},{,},{,},},},{
    2015-09-04 00:30:49.870[调试]@ejabberd_本地:do_路由:296本地路由
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmlel,,[{,},{,},{,…},{…},{xmlel,,…},{xmlcata,…},{…}|…]}
    2015-09-04 00:30:49.870[调试]@ejabberd_sm:do_路由:447会话管理器
    从{jid,,,,,}
    到{jid,,,,,}
    数据包{xmllel,,[{,}
    
    2015-09-04 00:30:19.862 [debug] <0.466.0>@shaper:update:120 State: {maxrate,1000,523.8875943484103,1441319395776490}, Size=477
    M=323.1461223235512, I=24086.201
    2015-09-04 00:30:19.863 [debug] <0.467.0>@ejabberd_router:do_route:323 route
        from {jid,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>}
        to {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        packet {xmlel,<<"message">>,[{<<"to">>,<<"user_b@localhost/7952730381441319317654314">>},{<<"type">>,<<"chat">>},{<<"id">>,<<"8C843796-CD60-4111-8754-EBAE20A0D75E">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"Test message">>}]},{xmlcdata,<<"\n">>},{xmlel,<<"html">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/xhtml-im">>}],[{xmlel,<<"body">>,[{<<"xmlns">>,<<"http://www.w3.org/1999/xhtml">>},{<<"style">>,<<"background-color:#e9e9e9;color:#000000;">>}],[{xmlel,<<"span">>,[{<<"style">>,<<"font-family: 'Helvetica';font-size: 12px;">>}],[{xmlcdata,<<"Test message">>}]}]}]},{xmlel,<<"x">>,[{<<"xmlns">>,<<"jabber:x:event">>}],[{xmlel,<<"composing">>,[],[]}]},{xmlcdata,<<"\n">>},{xmlel,<<"active">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/chatstates">>}],[]}]}
    2015-09-04 00:30:19.863 [debug] <0.467.0>@ejabberd_local:do_route:296 local route
        from {jid,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>}
        to {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        packet {xmlel,<<"message">>,[{<<"to">>,<<"user"...>>},{<<"type">>,<<...>>},{<<...>>,...}],[{xmlel,<<...>>,...},{xmlcdata,...},{...}|...]}
    2015-09-04 00:30:19.864 [debug] <0.467.0>@ejabberd_sm:do_route:447 session manager
        from {jid,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>}
        to {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        packet {xmlel,<<"message">>,[{<<"to">>,<<"user"...>>},{<<"type">>,<<...>>},{<<...>>,...}],[{xmlel,<<...>>,...},{xmlcdata,...},{...}|...]}
    2015-09-04 00:30:19.864 [debug] <0.467.0>@ejabberd_sm:do_route:565 sending to process <0.458.0>
    2015-09-04 00:30:19.864 [debug] <0.456.0>@ejabberd_http_bind:prepare_response:917 OutPacket: [{xmlstreamelement,{xmlel,<<"message">>,[{<<"from">>,<<"user_a@localhost/MacBook Air de Cyrille">>},{<<"to">>,<<"user_b@localhost/7952730381441319317654314">>},{<<"type">>,<<"chat">>},{<<"id">>,<<"8C843796-CD60-4111-8754-EBAE20A0D75E">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"Test message">>}]},{xmlcdata,<<"\n">>},{xmlel,<<"html">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/xhtml-im">>}],[{xmlel,<<"body">>,[{<<"xmlns">>,<<"http://www.w3.org/1999/xhtml">>},{<<"style">>,<<"background-color:#e9e9e9;color:#000000;">>}],[{xmlel,<<"span">>,[{<<"style">>,<<"font-family: 'Helvetica';font-size: 12px;">>}],[{xmlcdata,<<"Test message">>}]}]}]},{xmlel,<<"x">>,[{<<"xmlns">>,<<"jabber:x:event">>}],[{xmlel,<<"composing">>,[],[]}]},{xmlcdata,<<"\n">>},{xmlel,<<"active">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/chatstates">>}],[]}]}}]
    2015-09-04 00:30:19.865 [debug] <0.456.0>@ejabberd_http_bind:send_outpacket:1059  --- outgoing data --- 
    <body xmlns='http://jabber.org/protocol/httpbind'><message xmlns='jabber:client' from='user_a@localhost/MacBook Air de Cyrille' to='user_b@localhost/7952730381441319317654314' type='chat' id='8C843796-CD60-4111-8754-EBAE20A0D75E'><body>Test message</body>
    <html xmlns='http://jabber.org/protocol/xhtml-im'><body xmlns='http://www.w3.org/1999/xhtml' style='background-color:#e9e9e9;color:#000000;'><span style='font-family: &apos;Helvetica&apos;;font-size: 12px;'>Test message</span></body></html><x xmlns='jabber:x:event'><composing/></x>
    <active xmlns='http://jabber.org/protocol/chatstates'/></message></body>
     --- END --- 
    2015-09-04 00:30:30.178 [debug] <0.466.0>@ejabberd_receiver:process_data:349 Received XML on stream = <<"\r\n">>
    2015-09-04 00:30:30.179 [debug] <0.466.0>@shaper:update:120 State: {maxrate,1000,271.84566900163605,1441319419862845}, Size=2
    M=1.1573040463605986, I=10315.866
    2015-09-04 00:30:49.865 [info] <0.457.0>@ejabberd_http_bind:handle_info:522 Session timeout. Closing the HTTP bind session: <<"4388150e84a2c3e491fb66d9ff77ae9b78492cde">>
    2015-09-04 00:30:49.865 [debug] <0.457.0>@ejabberd_http_bind:terminate:558 terminate: Deleting session 4388150e84a2c3e491fb66d9ff77ae9b78492cde
    2015-09-04 00:30:49.865 [info] <0.458.0>@ejabberd_c2s:terminate:1842 ({socket_state,ejabberd_http_bind,{http_bind,<0.457.0>,{{127,0,0,1},55272}},ejabberd_http_bind}) Close session for user_b@localhost/7952730381441319317654314
    2015-09-04 00:30:49.866 [debug] <0.458.0>@mod_pubsub:node_action:4118 node_action <<"pubsub.localhost">> <<"flat">> get_entity_affiliations [<<"pubsub.localhost">>,{<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}]
    2015-09-04 00:30:49.866 [debug] <0.458.0>@mod_pubsub:node_call:4099 node_call <<"flat">> get_entity_affiliations [<<"pubsub.localhost">>,{<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}]
    2015-09-04 00:30:49.866 [debug] <0.458.0>@mod_pubsub:node_action:4118 node_action <<"pubsub.localhost">> <<"hometree">> get_entity_affiliations [<<"pubsub.localhost">>,{<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}]
    2015-09-04 00:30:49.867 [debug] <0.458.0>@mod_pubsub:node_call:4099 node_call <<"hometree">> get_entity_affiliations [<<"pubsub.localhost">>,{<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}]
    2015-09-04 00:30:49.867 [debug] <0.458.0>@mod_pubsub:node_action:4118 node_action <<"pubsub.localhost">> <<"pep">> get_entity_affiliations [<<"pubsub.localhost">>,{<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}]
    2015-09-04 00:30:49.867 [debug] <0.458.0>@mod_pubsub:node_call:4099 node_call <<"pep">> get_entity_affiliations [<<"pubsub.localhost">>,{<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}]
    2015-09-04 00:30:49.867 [debug] <0.458.0>@mod_carboncopy:disable:249 disabling for <<"user_b">>
    2015-09-04 00:30:49.867 [debug] <0.458.0>@mod_shared_roster:unset_presence:1104 unset_presence for <<"user_b">> @ <<"localhost">> / <<"7952730381441319317654314">> -> <<>> (0 resources)
    2015-09-04 00:30:49.868 [debug] <0.458.0>@ejabberd_router_multicast:do_route:193 route_multicast
        from user_b@localhost/7952730381441319317654314
        domain localhost
        destinations [<<"user_b@localhost">>]
        packet {xmlel,<<"presence">>,[{<<"type">>,<<"unavailable">>}],[]}
    2015-09-04 00:30:49.868 [debug] <0.458.0>@ejabberd_router:do_route:323 route
        from {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        to {jid,<<"user_b">>,<<"localhost">>,<<>>,<<"user_b">>,<<"localhost">>,<<>>}
        packet {xmlel,<<"presence">>,[{<<"type">>,<<"unavailable">>}],[]}
    2015-09-04 00:30:49.868 [debug] <0.458.0>@ejabberd_local:do_route:296 local route
        from {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        to {jid,<<"user_b">>,<<"localhost">>,<<>>,<<"user_b">>,<<"localhost">>,<<>>}
        packet {xmlel,<<"presence">>,[{<<"type">>,<<"unav"...>>}],[]}
    2015-09-04 00:30:49.869 [debug] <0.458.0>@ejabberd_sm:do_route:447 session manager
        from {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        to {jid,<<"user_b">>,<<"localhost">>,<<>>,<<"user_b">>,<<"localhost">>,<<>>}
        packet {xmlel,<<"presence">>,[{<<"type">>,<<"unav"...>>}],[]}
    2015-09-04 00:30:49.869 [info] <0.458.0>@ejabberd_c2s:handle_unacked_stanzas:2877 1 stanzas were not acknowledged by user_b@localhost/7952730381441319317654314
    2015-09-04 00:30:49.869 [debug] <0.458.0>@ejabberd_router:do_route:323 route
        from {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        to {jid,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>}
        packet {xmlel,<<"message">>,[{<<"type">>,<<"error">>},{<<"to">>,<<"user_a@localhost/MacBook Air de Cyrille">>},{<<"from">>,<<"user_b@localhost/7952730381441319317654314">>},{<<"id">>,<<"8C843796-CD60-4111-8754-EBAE20A0D75E">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"Test message">>}]},{xmlcdata,<<"\n">>},{xmlel,<<"html">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/xhtml-im">>}],[{xmlel,<<"body">>,[{<<"xmlns">>,<<"http://www.w3.org/1999/xhtml">>},{<<"style">>,<<"background-color:#e9e9e9;color:#000000;">>}],[{xmlel,<<"span">>,[{<<"style">>,<<"font-family: 'Helvetica';font-size: 12px;">>}],[{xmlcdata,<<"Test message">>}]}]}]},{xmlel,<<"x">>,[{<<"xmlns">>,<<"jabber:x:event">>}],[{xmlel,<<"composing">>,[],[]}]},{xmlcdata,<<"\n">>},{xmlel,<<"active">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/chatstates">>}],[]},{xmlel,<<"error">>,[{<<"code">>,<<"503">>},{<<"type">>,<<"cancel">>}],[{xmlel,<<"service-unavailable">>,[{<<"xmlns">>,<<"urn:ietf:params:xml:ns:xmpp-stanzas">>}],[]}]}]}
    2015-09-04 00:30:49.870 [debug] <0.458.0>@ejabberd_local:do_route:296 local route
        from {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        to {jid,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>}
        packet {xmlel,<<"message">>,[{<<"type">>,<<"erro"...>>},{<<"to">>,<<...>>},{<<...>>,...},{...}],[{xmlel,<<...>>,...},{xmlcdata,...},{...}|...]}
    2015-09-04 00:30:49.870 [debug] <0.458.0>@ejabberd_sm:do_route:447 session manager
        from {jid,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>,<<"user_b">>,<<"localhost">>,<<"7952730381441319317654314">>}
        to {jid,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>,<<"user_a">>,<<"localhost">>,<<"MacBook Air de Cyrille">>}
        packet {xmlel,<<"message">>,[{<<"type">>,<<"erro"...>>},{<<"to">>,<<...>>},{<<...>>,...},{...}],[{xmlel,<<...>>,...},{xmlcdata,...},{...}|...]}
    2015-09-04 00:30:49.870 [debug] <0.458.0>@ejabberd_sm:do_route:565 sending to process <0.467.0>
    2015-09-04 00:30:49.870 [debug] <0.467.0>@ejabberd_c2s:send_text:1901 Send XML on stream = <<"<message from='user_b@localhost/7952730381441319317654314' to='user_a@localhost/MacBook Air de Cyrille' type='error' id='8C843796-CD60-4111-8754-EBAE20A0D75E'><body>Test message</body>\n<html xmlns='http://jabber.org/protocol/xhtml-im'><body xmlns='http://www.w3.org/1999/xhtml' style='background-color:#e9e9e9;color:#000000;'><span style='font-family: &apos;Helvetica&apos;;font-size: 12px;'>Test message</span></body></html><x xmlns='jabber:x:event'><composing/></x>\n<active xmlns='http://jabber.org/protocol/chatstates'/><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></message>">>