I think, I did not get your question. You want to directly send message from one server to another? In JMS, it will be like, you will be publishing a message for a topic to a JMS server and there will be subscribers to that topic who will receieve the message that you published. None of the clients (publisher/consumer) resides inside the JMS server, so in a JMS scenario, all the parties are distributed! Both publisher and consumer uses a JMS client library that takes care of delivering the message to the JMS server and getting messages from the server to the client. Whichever sample code you would have got on the internet will refer to the above scenario only and you do not have to look for different versions for a distributed scenario so to say. Hope this helps.