4 Replies Latest reply on Nov 27, 2016 1:13 PM by wroot

    Connecting to one JID using multiple devices

    Nima soufiloo


      I am using Openfire 4.0.3. Recently I wanted my clients to use same JID with multiple devices (for example spark on windows and IM+ on android) but when someone sends a message to another JID (for example user@openfire-srv), openfire sends the message to the most recent active resource (not all the clients that are logged into the server).

      I added route.all-resources with true value to the server properties and restarted the server. I also made sure that clients are using the general JID (for example alex@openfire-srv not a bare JID like alex@openfire/spark) then I set all priorities to 1 so the message doesn't just reach the resource with the most priority but I still got problem cause the messages still reach the most recent resource.

      Another thing that I need is that I want my users to see all their messages that are sent with every resource, for example Alex got IM+ on his android and spark on his Windows.Now Alex sends "Hello" to Jim with his spark then I need Alex to see his sent message on both devices (IM+ and Spark).


      I will be so thankful if anyone cant make a suggestion on how to make these work.

        • Re: Connecting to one JID using multiple devices

          I think you're talking about carbon support.  Unfortunately, spark does not support carbons.  You may want to test with a client that does support carbons to see if you get the desired results.

          • Re: Connecting to one JID using multiple devices
            Nima soufiloo

            thanks but what about receiving messages with resources that use same priority ?

            Is route.all-resources properties just not working or am I doing something wrong ?

              • Re: Connecting to one JID using multiple devices

                How did you make clients to use only the bare JID? A client usually will send a message to a bare JID when a conversation is first initiated, but when a client sends a reply, it usually sends it to the resource it got a message from, so not a bare JID anymore. Most (if not all) clients operate like that. So, unless you somehow modify your clients (source code) this property will only work for a first message in a new conversation. New conversation happens after both parties close their chats (i think), or you can try to restart both clients to make sure it is reset.



                user1@server/resource1 sends a message to user2@server

                user2@server receives a message and it sees that it came from user1@server/resource1

                when user2@server replies, it sends it directly to user1@server/resource1, that's why user1@server/resource2 won't get it, even if both resources have the same priority.


                As explained in that document, this property wasn't intended for message synchronization. I think it was created for some specific scenarios like sending announcements from a server, etc.