OpenFire appends destination information to smack client

We are using a remote monitoring system with an agent application that uses XMPP to send data back to a console application. The remote monitoring agent sends data to an Open Fire Server that forwards the data to an ejabbard server and then onto the remote monitoring console application. Both the agent and console use smack. We are planning to move the ejabberd server to OpenFire but just have not had the time!

remote agent - smack client <-----> Open Fire Server <-------> ejabberd <--------> smack client - remote monitoring console

Server names ofserver ** xmpp.x.co.uk**

All the rosters have been configured on both Open Fire and ejabberd and these have been tested using Spark i.e. if we log in using Spark to ofserver we can send messages to Spark logged in as a user on xmpp.x.co.uk.

The remote remote agent application is set up to send data to console@xmpp.x.co.uk and has an account on ofserver.

This works for a period of time but then data stops and we can see on the remote agent the messages building up. OpenFire reports that the remote agent is online but it cannot send messages. The agent application stores unsent messages in a store and forward file and looking at the messages stored the destination has changed to console@xmpp.co.uk@ofserver i.e. @ofserver has been appended to the destination. This address has not been set in the client application. When the agent application is restarted the destination reverts back to console@xmpp.x.co.uk, the system works for a few hours or days and then the destination changes again to console@xmpp.co.uk@ofserver. I am not sure if the issue lies with OpenFire or the Smack API changing the destination (or me not configuring something).