powered by Jive Software

Multiple connections for same user?


I’m using XMPP mostly for communication between servers, so user has to be connected to the XMPP server for exchanging messages with other users. However I also need for the client side application to present the user with roster and update on changes, for this I need to connect again on behalf of the same user to the XMPP server. Does OpenFire support that? I assumed that’s what the service is for, but it didn’t work. As soon as I connect the client, I get this exception:

stream:error (conflict)

at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:306)

at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)

at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:76)

(I’m using OpenFire as XMPP server and Smack)

Any idea?


You have to connect with a different JID for the same user by using a different resource. The client code can simply add an appropriate resource so the two connections will be



you’re right, this is what I meant to do, but I forgot to add the resource to my call to connect(user, pass, resource) :slight_smile: