Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page:  1  2  next
Avatar
deepak #1
Member since Dec 2005 · 26 posts
Group memberships: Members
Show profile · Link to this post
Subject: Message Delivered or not
How do i come to know that my message is delivered or not...
I mean how do i come to know whether the recipient got my message or not ??

Anyone has visual basic .net or c# code for this??

Thanks
Avatar
Jabberer #2
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
hello Deepak,

Message Events JEP-0022 is what you are looking for.
You have to implement this JEP in your messages. In agsXMPP you can find it in the agsXMPP.protocol.x namespace.

Your sending client must request the delivered event and the receiving client must send the notofication once it received the message.

Jabberer
Software Developer
AG-Software
This post was edited on 2006-04-18, 11:36 by Jabberer.
Avatar
deepak #3
Member since Dec 2005 · 26 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to use agsXMPP.protocol.x
Hello Jabberer

How to use agsXMPP.protocol.x ?
Can u pls provide me some visual basic .net or c# code for that ?

Thanks for replying.
Avatar
Alex #4
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Here is a c# sample

Client 1 sends a message and requests the displayed event. The messages need a unique id which i generated here with the GenerateId() method.
  1. agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message();
  2. msg.From = new Jid("romeo@montague.net");
  3. msg.To = new Jid("juliet@capulet.com");
  4. msg.GenerateId();
  5. msg.Body = "Hello World";
  6. // Add the event to the message
  7. agsXMPP.protocol.x.Event ev = new Event();
  8. ev.Displayed = true;
  9. msg.AddChild(ev);

When client 2 receives this message and is sending the displayed notification to client 1
  1. agsXMPP.protocol.client.Message msg2 = new agsXMPP.protocol.client.Message();
  2. msg2.From = new Jid("juliet@capulet.com");
  3. msg2.To = new Jid("romeo@montague.net");
  4. // Add the event to the message           
  5. agsXMPP.protocol.x.Event ev2 = new Event();
  6. ev2.Displayed = true;
  7. ev2.Id = msg.Id;
  8. msg2.AddChild(ev2);

Alex
Avatar
deepak #5
Member since Dec 2005 · 26 posts
Group memberships: Members
Show profile · Link to this post
Hello Alex, Thanks for the code.

But still I have some queries in mind ...

With the code u supplied sender will be notified that
the recipient got the message but what if the recipient didn't got the message...
How the sender will be notified about this ??

Can u pls help me out here ??
Avatar
Jabberer #6
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Hello,

if you send a message and the server can't deliver this message for some reason you get an message of type error back from the server. Reason could be eg. that you sent a message to a user which doesnt exist.
If you get no error from the server then the message was sent, which doesnt mean that it was delivered. A user could be offline and the message is stored on the server then, and will be delivered once the user will login the next time. In this case you get your delivered notification not immediately.

Jabberer
Software Developer
AG-Software
Avatar
deepak #7
Member since Dec 2005 · 26 posts
Group memberships: Members
Show profile · Link to this post
Hello Jabberer, Thanks for the reply.

I have developed an Messenger client using agsXMPP library version 0.5.0.0.
Sometimes im my application it happens that the recipient doesn't gets the message.
I am not getting what is the problem. Is this is a agsXMPP problem or my application problem ?

I am using Jive Messenger, Version: 2.2.2 as my xmpp server which is running on my development machine.
Everyday around 40 messenger clients connect to this jive server. SQL Server 2000 is also running on my machine.

I think why the recipient sometimes doesn't gets the message is because everything is running on my development machine.
I am planning it to move to a proper server. Also the agsXMPP library I used is old one, so I need to replace it with new one.
Also the jive messenger server I am using is old one that also I need to replace with latest version.

Can u guys pls guide me to solve this issue.
Avatar
Jabberer #8
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Hello,

look at the debug logs of agsXMPP and Jive messenger. If the message is sent from agsXMPP then the server must route it to the other clent. If the server is not able to route the message for some reason then it will send you back a message of type error which looks like that:

  1. <message from="....." to="...." type="error">
  2.  <body>.....</body>
  3.  <error>.....</error>
  4. </message>

if you don't get such a message, and agsXMPP got no disconnect after sending the message, then everything is OK. If the other client doesn't get the message then the problem is located on the server.
Running everything on the developer machine should be no problem. Check also the error logs of Jive Messenger (Wildfire)
Software Developer
AG-Software
Avatar
danny_dong #9
Member since Apr 2011 · 9 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Quote by Jabberer on 2006-04-18, 11:02:
In agsXMPP you can find it in the agsXMPP.protocol.x namespace.

This is my first post here. First of all thanks so much for your great job.

My question is where can I find the agsXMPP.protocol.x equivalent in MatriX?

Thanks a lot.

Danny
Avatar
Alex #10
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
MatriX does not differ between old Jabber style extensions and XEPS like agsXMPP does, or is trying to do ;-).
In MatriX all extensions and XEPs are under the MatriX.Xmpp namespace.

Alex
Avatar
danny_dong #11
Member since Apr 2011 · 9 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex for your rapid reply. Sorry for bothering you again with newbie questions :)

1. Would you please show me specifically which namespace in MatriX shall I use to implement the above-mentioned JEP-0022? That's to say, which namespace in MatriX is the successor of the agsXMPP.protocol.x?

2.
Quote by Jabberer on 2006-04-18, 11:02:
Your sending client must request the delivered event and the receiving client must send the notofication once it received the message.

So the whole thing is:

a) the sender send message A bearing a ID tag to the receiver;
b) the receiver got message A and send back a empty message B bearing an event tag of the ID of message A;
c) the sender got a new message, and try to read its event.id. If its null then it's a regular chat message. If not then we read the event.id and tell the user in some way that message A has been successfully delivered.

And, we need to do all these manully.

Is my understanding correct?

3. What's the meaning of introducing an event to do this? Seems we can achieve this simply using a custom formated message.id, without adding an event object to the message. Is it correct?

4. Is this notification procedures a common practice in mainstream XMPP clients? That's to say, when I do this in my app, can those who chatting with me with a Spark correctly response to my notifications by default?

Thanks so much.
Avatar
Alex #12
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by danny_dong:
Thanks Alex for your rapid reply. Sorry for bothering you again with newbie questions :)

1. Would you please show me specifically which namespace in MatriX shall I use to implement the above-mentioned JEP-0022? That's to say, which namespace in MatriX is the successor of the agsXMPP.protocol.x?

XEP-0022 is not in MatriX because its ab old Jabber style obsoleted extensions. You should use XEP-0085 Chat State Notifications instead. You can find it in MatriX in the  Matrix.Xmpp.Chatstates namespace.


Quote by danny_dong:
4. Is this notification procedures a common practice in mainstream XMPP clients? That's to say, when I do this in my app, can those who chatting with me with a Spark correctly response to my notifications by default?

for chat clients and chat messages XEP-0085 Chat State Notifications is a common practice. But when you are sending custom non chat related payloads there are better solutions.

Alex
Avatar
danny_dong #13
Member since Apr 2011 · 9 posts
Group memberships: Members
Show profile · Link to this post
thank you so much Alex. that seems exactly what I need.

You guyes are doing really great job ^^
This post was edited on 2011-04-09, 15:51 by danny_dong.
Avatar
danny_dong #14
Member since Apr 2011 · 9 posts
Group memberships: Members
Show profile · Link to this post
hi Alex,

Seems this is not what I need.

As described in XMPP.org, XEP-0085 defines an XMPP protocol extension for communicating the status of a user in a chat session, thus indicating whether a chat partner is actively engaged in the chat, composing a message, temporarily paused, inactive, or gone.

But what I need is something telling whether a message has been delivered, not only sent. This is what I call it a Reliable Conversation. This requires the receiver sending back some kind of a notification carrying the same ID as the received message's ID to the sender. Seems that's what the XEP-0085 can not handle.

In fact I've achieved this by adding a tag onto an empty message (telling the client that this is a "delivered notification" instead of a regular chat message) carrying the same ID as the received message's, and send the "delivered notification" back to the sender to tell him that the message (with the id of ID) has been successfully received.  What I need now is a standard way of doing this.

Correct me please if my concept to this is totally wrong.

Please help ~

Thank you in advance.
This post was edited on 2011-04-09, 15:55 by danny_dong.
Avatar
Alex #15
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please elaborate on what you are exactly looking for and what your requirements are.
In XMPP the message flow is the following:

client1 => server => client2

The most extensions are client based. This means when client2 received the message the client will sent you back an receipt.
If this is what you want then you should look at: XEP-0022: Message Events

There is a very new extension called XEP-0198: Stream Management.
There you can requests Acks from the server when your stanza was delivered. This extension is pretty new and not supported by most servers.

Alex
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:
Page:  1  2  next
Forum: agsXMPP RSS