12 Replies Latest reply on Feb 22, 2009 10:28 AM by Eric Hatley

    Simple 2 Server Setup

    Eric Hatley Newbie

      This, i thought, was going to be a simple Proof of Concept of how JBoss Messaging was intended to be used, but I am at a dead end. I have read the manual, and found nothing concrete on this, but it could be a fundamental understanding on how JBM works with a Serverless queuing system.

      I would like to take 2 App Servers with JBM(both successfully installed via the tool) on individual machines, put a message to one of the app servers, and have the appserver on the second machine process the message (via MDB subcriber). Posting everything to one appserver was extremely easy to do, but there I am having trouble making the leap to having 2 JBM installations "speak' to each other.

      -This idea would make use of topic type messaging
      -The AppServer would communicate the information through the bisocket protocol
      -The Client to the topic queue would not need to know anything about machine #2.

      So i guess my questions would be around:
      -how do you verify a bisocket communcation is set up?
      -Is this what JBM was intended to do?

        • 1. Re: Simple 2 Server Setup
          Yong Hao Gao Master

          -how do you verify a bisocket communcation is set up?

          Which version of JBM are you using? for 1.4, you can run the distributed topic example.

          -Is this what JBM was intended to do?
          yes, JBM supports clustering.

          • 2. Re: Simple 2 Server Setup
            Peter Johnson Master

            Could you also give us a little more information about your use case. It seems that you want to have two independent messaging servers. Why? Usually a client app sticks a message on JBM, and another client app reads the message.

            As gaohoward said, you can cluster JBM, but then it is more of a single logical instance spread out among multiple hosts.

            • 3. Re: Simple 2 Server Setup
              Eric Hatley Newbie

              i think i am trying to set the classic topic/subscriber pattern, where one server is a publisher and the other servers, in my case only one of each, but if this work, there will be many subscribers to the topic. i am a bit confused on how each client of the topic gets notified of a publish message. i was thinking that thr bisocket adapter passed the message along, in a daisy chain style approach, but i am having trouble doing a put on one appserver and have message show up in the queue on another app

              • 4. Re: Simple 2 Server Setup
                Peter Johnson Master

                Both the publisher and all of the subscribers register with the same JBM. Then when the publishers sends a message, all subscribers receive it.

                Want an example? Download the source code for JBoss In Action at http://www.manning.com/jbossinaction. Open the jbia-src/index.html file to read about some config settings and to read about the example apps in chapter 8. Then in jbia-src/ch08 build Ant target 01. This is a simple publisher/subscriber example app.

                • 5. Re: Simple 2 Server Setup
                  Eric Hatley Newbie

                  I will take a look at those examples, but I am really trying to use JBoss 4.x app server and messaging 1.4.

                  There is quite a difference in the way it is coded, and we are already set up on JBoss 4.2

                  Would you have any simple example of this on that platform? involving 2 servers? each on a different machine? I completely understand the example where one server is involved, but I am bit hazy on how the remoting/bisocket connector allows this to work.

                  • 6. Re: Simple 2 Server Setup
                    Peter Johnson Master

                    I don't have anything that uses two servers. And from my understanding, the remoting/bisocket connector is for between a client and the server. But then I could be wrong. Perhaps someone on the messaging team will chime in.

                    • 7. Re: Simple 2 Server Setup
                      Yong Hao Gao Master

                      I think I'm clear now about what your case is. From JBM respective, you only have one server machine and one client machine. To enable the two machine talk to each other via bisocket transport, you need to start the bisocket connector service on both machine. How bisocket works is well explained in its document, which is available for download at jboss.org.

                      • 8. Re: Simple 2 Server Setup
                        Eric Hatley Newbie

                        I agree with you that my use case is very simple and should be easy to complete, but I HAVE read the manual, and the overview that is in the manual doesnt help.


                        If you have a document that is actually helpful, please forward a link to me.

                        • 9. Re: Simple 2 Server Setup
                          Tim Fox Master

                          What you're trying to do is NOTHING to do with JBM clustering, In fact nothing to do with JBM.

                          To figure out how to get an MDB on one node to listen to a different server there are documents on the wiki that explain how to do this.

                          This is a JCA configuration question and you should ask in the JCA forum.

                          • 10. Re: Simple 2 Server Setup
                            Eric Hatley Newbie

                            I respectively disagree. I dont think clustering is the answer here, unless you are talking about how to cluster a queue,it should be as simple as configuring a topic for pub/sub and propogation of this to different servers.

                            If in fact that the MDB has to make a client connection from its host server to the publishing server to listen for messages, then I no longer understand the point of JBM.

                            The way I read the documents, JBM was a serverless queuing system, so you could basically publish from anywhere to the queueing "web" of servers and a subscriber in any other location could listen for hte message as it is replicated among all Serverpeer locations.

                            • 11. Re: Simple 2 Server Setup
                              Tim Fox Master

                              Yes JBM can to do that, please look at the examples in the distro.

                              • 12. Re: Simple 2 Server Setup
                                Eric Hatley Newbie

                                I have had more time to look at the examples, and they are very straightforward on how to handle topics on a single server, but I still have one fundamental question. How does the Server peer architecture exchange messages and know about global queues? Only through them being clustered?