Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
Orion #1
Member since Jul 2009 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Sending messages between agsXMPP clients never reach a secondary client for same user
It was my understanding that sending a message to user@server would reach *all* clients/resources that are connected to the server.  However, I am seeing some behavior that doesn't jive with that statement.

- I login with user A with Pidgin (and xmpp compliant chat app) into my jabber server.
- I run a unit test (NUnit) where it logs into the same jabber server with user B using ags SDK
- User B (ags) then sends a message to A.  I see the receipt of A in my Pidgin client just fine.  I can continue sending message no problem.

Now, the problem
- With the above setup, I *also* connect to the server with user A using ags.  So, user A is connected twice - once with Pidgin, and once with ags
- The second connection for A is in the same application as B.  In other words, they each created their own Client instance, but they are running together in memory in the same app, same app domain, etc.
-  However, with this scenario, the Pidgin client just stops receiving any messages, at all.  The ags client for A gets all the messages just fine.  B still receives messages from both instances of A, but only the ags client for A gets messages from B.

It is almost like the Ags library has a loopback check, and it says "hey, I can already see jabber user A here, no need to make a trip to the server", and then just routes the messages to the ags client, instead of hitting my jabber server.  I have serious doubts that that is actually what is happening, it just describes the behavior I am seeing.

I am *not* specifying a specific resource when sending the messages to A.  The "TO" lines are simply user@server, not user@server/resource123.

Any idea what is going on here?

EDIT: In case it matters, I'm running ejabberd.  So this isn't some hacked together in house xmpp server.
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by Orion:
It was my understanding that sending a message to user@server would reach *all* clients/resources that are connected to the server.  However, I am seeing some behavior that doesn't jive with that statement.

this assumption is wrong. The XMPP RFCs has multiple options there, and its up to the server how to handle messages to a bare jid.
Some servers (eg GTalk) send the message to all resources, the most servers send it to the most avaiable resource which is related to the priority.

see: http://xmpp.org/internet-drafts/draft-ietf-xmpp-3921bis-03…

Alex
Avatar
Orion #3
Member since Jul 2009 · 6 posts
Group memberships: Members
Show profile · Link to this post
Interesting... thanks for straightening me out!
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