Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
cbhujbal #1
Member since Nov 2011 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: About Error Message Received from Gtalk Server.
Hi,

I use agsxmpp for sending the message to (50+) multiple users.
Some of users get following two type of error.

<message xmlns="jabber:client" type="error" from="abc@gmail.com" to="xyz@gmail.com/agsXMPP27016B53"><body>Hi</body><error type="cancel" code="503"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></message>

and

<message xmlns="jabber:client" type="error" from="abc@gmail.com" to="xyz@gmail.com/agsXMPP27016B53"><body>Hi</body><nos:x xmlns:nos="google:nosave" value="disabled" /><arc:record xmlns:arc="http://jabber.org/protocol/archive" otr="false" /><error type="cancel" code="503"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></message>

Please send me the meaning with how to resolve them.

Thanks
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
This means that the user you are sending the messae to is currently not available (online) or offline stoage of messages is disabled for this user. So your message cannot be delivered.

Alex
Avatar
cbhujbal #3
Member since Nov 2011 · 8 posts
Group memberships: Members
Show profile · Link to this post
Hi,

I have one another issue that the OnMessage delegate used in my code is firing multiple times. so as result of that the messages are either dropping or multiple messages are being sent(a person is receiving message 10 times ..)
can you help me with that?
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
This handler gets fired exactly once for each message you receive on the incoming stream. When you get it multiple times then there is ether a bug in your code which subscribes more than once to this handler, or you get multiple incoming messages.

Alex
Avatar
cbhujbal #5
Member since Nov 2011 · 8 posts
Group memberships: Members
Show profile · Link to this post
Hi alex,

thanks for previous reply.

Also i just want to know, What is the meaning of xmppCon.AutoAgents = true; and xmppCon.AutoResolveConnectServer = true;
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You can ignore the AutoAgents. Agents were used in the old Jabber times, but not now in XMPP anymore.
AutoResolveConnectServer resolves the SRV records automatically to find the host of the XMPP service.
See also: http://en.wikipedia.org/wiki/SRV_record
Avatar
cbhujbal #7
Member since Nov 2011 · 8 posts
Group memberships: Members
Show profile · Link to this post
Hi alex,

I am sending message both online and offline users, but offline messages are not been delivered.

But as per your discussion in http://forum.ag-software.de/post/4691 #22.
When a user is offline then you must send the message to the bare jid.

So Should i send the messages by using bare jid for both online and offline users?.

I am using following code currently.
xmppCon.Send(new Message(new Jid(strEmail), MessageType.chat, msg.Body));
Avatar
Alex #8
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you must send messages to offline users always to the bare Jid.
For online users its up to you whether the bare jid or full jid works better for your use case. When a user is online with multiple clients at GTalk then messages to bare Jids get delivered to all clients, while messages to a full Jid get only delivered to client with the given resource.

Alex
Avatar
cbhujbal #9
Member since Nov 2011 · 8 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

do i have to check presence before sending message to the users in my friend list.
Avatar
Alex #10
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
when you send to a full Jid you always have to.
When you send to a bare Jid normally not. Because the sever should store messages offline and deliver them when the user comes online the next time. But Google Talk does not store offline messages by default. So if a user has disabled offline messages in GTalk you get also an error back.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS