4 Replies Latest reply on Apr 28, 2004 7:32 AM by kevin221

    jms on multiple systems

    kevin221 Newbie


      I have developed an application which publishes messages to a topic, a message listener listens to the topic and delivers data to another instance of the application. At the moment the clients are on the same system but after reading the FAQ it doesn't look too difficult to deploy the clients on seperate machines. My question is though, what would be the best way to add new clients dynamically, i.e. the hostnames of the computers on the network would only be known at runtime. Any advice appreciated,



        • 1. Re: jms on multiple systems
          Adrian Brock Master

          You can generate those xml files at runtime and copy them to the deploy directory.
          Or you can use JMX to invoke deploy(URL) on the MainDeployer.
          It depends upon whether you want the definition to survive a reboot.


          • 2. Re: jms on multiple systems
            kevin221 Newbie

            Thanks, furthermore, if I am hoping to have a reasonably large number of clients, is the best way to have some kind of way of arranging the nodes, each one passing the messages on until the required topic is found, or is there another way? I cant seem to find any examples which use multiple publishers and subscribers, and I was wondering if there is way to do this that is not too complex. Ideally my application is distributed however, with publishers and subscribers joining and leaving so this would be a problem, but it is undesirable to have a central hub and therefore bottleneck.

            • 3. Re: jms on multiple systems
              Adrian Brock Master

              Please rephrase your question as a specific problem rather than asking too generic a question.

              I don't understand "Add clients dynamically". Clients subscribe to the server dynamically
              if you allow them to do it, there is no need for xml configuration other than setting up

              • 4. Re: jms on multiple systems
                kevin221 Newbie

                Sorry that wasn't very clear. The clients I have developed both publish to the topic and subscribe to the topic via a message listener. I understand your first reply about the xml files, i thought that may be the solution to the remote server not being known. The problem is however, I have been unable to track down any examples where there are multiple publishers and subscribers to a topic and would appreciate being pointed in the right direction. I can see how a topic could be created on a machine, then connection factories on the other machines could point to this machine. If the original machine hosting the topic closes its connection, then everything will fail. I am thinking there is no way around this is this correct?