Subject: Want my own server to route message to recipient
Hi everyone,
I'm new to XMPP. I have just created a .Net server based on agsXMPP library. The server is able to receive messages from A but I am not sure how and when exactly I need to push those to the recipient B.
I know it should be done in real-time if B's presence is online or later if it's offline. However, I am not sure about the best practice here:
- should the thread running the first XmppServerConnection (handling sender A) put messages in a queue so another thread running another XmppServerConnection instance (handling recipient B) collects it from there? Is there a straighforward agsXMPP built-in way of doing that?
- or should I extend using Push Notifications?
N.B. my code resembles the one found here - below - and if you notice: line 140 just says "route the messages here" with no further explanations.
https://github.com/meebey/agsxmpp/blob/master/samples/VS20…
Finally, on https://www.ietf.org/rfc/rfc3921.txt it says:
Exchanging messages is a basic use of XMPP and is brought about when
a user generates a message stanza that is addressed to another
entity. As defined under Server Rules for Handling XML Stanzas
(Section 11), the sender's server is responsible for delivering the
message to the intended recipient (if the recipient is on the same
server) or for routing the message to the recipient's server (if the
recipient is on a different server).
So I assume there is no particular way to deliver but if someone could recommend something that worked well I'd be glad!
I appreciate any help
Thanks
I'm new to XMPP. I have just created a .Net server based on agsXMPP library. The server is able to receive messages from A but I am not sure how and when exactly I need to push those to the recipient B.
I know it should be done in real-time if B's presence is online or later if it's offline. However, I am not sure about the best practice here:
- should the thread running the first XmppServerConnection (handling sender A) put messages in a queue so another thread running another XmppServerConnection instance (handling recipient B) collects it from there? Is there a straighforward agsXMPP built-in way of doing that?
- or should I extend using Push Notifications?
N.B. my code resembles the one found here - below - and if you notice: line 140 just says "route the messages here" with no further explanations.
https://github.com/meebey/agsxmpp/blob/master/samples/VS20…
Finally, on https://www.ietf.org/rfc/rfc3921.txt it says:
Exchanging messages is a basic use of XMPP and is brought about when
a user generates a message stanza that is addressed to another
entity. As defined under Server Rules for Handling XML Stanzas
(Section 11), the sender's server is responsible for delivering the
message to the intended recipient (if the recipient is on the same
server) or for routing the message to the recipient's server (if the
recipient is on a different server).
So I assume there is no particular way to deliver but if someone could recommend something that worked well I'd be glad!
I appreciate any help

Thanks