1 2 Previous Next 17 Replies Latest reply on Jul 7, 2003 11:22 PM by ivelin.ivanov

    JMS P2P cluster load balancing

    ivelin.ivanov

       

      "ivelin" wrote:
      I have posted a question on the cluster forum, but since a I have not received a response, I thought I'd try this forum:

      http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=


        • 1. Re: JMS P2P cluster load balancing

          For the nth time.

          JBossMQ does not support clustering.

          There is a load balancing IL but it is useless
          without replication.

          Regards,
          Adrian

          • 2. Re: JMS P2P cluster load balancing
            ivelin.ivanov

            If this is true than the documentation advertises in an ambiguous way.

            Which J2EE services other than HTTP and JNDI are fully cluster enabled (load balancing + fault tolerance)?

            • 3. Re: JMS P2P cluster load balancing

              HTTP - replicated sessions
              load balancing is either hardware or Apache

              HAJNDI has failover (if the binding is not available
              in the node you contact it searches all nodes).
              It also supports discovery when your specified
              target node(s) is(are) not available.

              Stateless session beans - failover/load balancing
              (no state replication required)

              Stateful session beans - failover/load balancing
              and replicated sessions

              Entity Beans - failover/load balancing
              if you really want to access entity beans remotely :-)
              State is in the db.

              Which part is ambigous? You can make a post
              in the docs section or report a bug on sourceforge.

              Also, if you use the jdbc2 persistence manager
              and don't use durable topic subscriptions you
              can do a cold failover of messaging.
              A cold failover means you can boot another
              machine to take over where the failed machine
              left off, the state (except the durable
              subscriptions) is in the db.
              The clients won't automatically failover.

              Regards,
              Adrian

              • 4. Re: JMS P2P cluster load balancing
                ivelin.ivanov


                Thank you for the thorough response.

                I guess the one part of my post that has not been addressed yet is, when is JMS Clustering going to happen.
                If one wants to help with the development, where would be a good place to start?

                • 5. Re: JMS P2P cluster load balancing
                  ivelin.ivanov


                  Thank you for the thorough response.

                  I guess the one part of my post that has not been addressed yet is, when is JMS Clustering going to happen.
                  If one wants to help with the development, where would be a good place to start?

                  • 6. Re: JMS P2P cluster load balancing
                    ivelin.ivanov

                    Looking at the 3.2.1 source code, I found the following package under cluster, which seems to suggest that JMS is clustered:

                    jboss-3.2.1-src\cluster\src\main\org\jboss\mq\il\ha

                    an example class:
                    public class HAServerILService extends org.jboss.mq.il.ServerILJMXService implements HAServerILServiceMBean

                    • 7. Re: JMS P2P cluster load balancing
                      ivelin.ivanov

                      Looking at the 3.2.1 source code, I found the following package under cluster, which seems to suggest that JMS is clustered:

                      jboss-3.2.1-src\cluster\src\main\org\jboss\mq\il\ha

                      an example class:
                      public class HAServerILService extends org.jboss.mq.il.ServerILJMXService implements HAServerILServiceMBean

                      • 8. Re: JMS P2P cluster load balancing

                        That is the load balancing IL.

                        We are re-writing jbossmq for jboss4,
                        but it won't make it into the first developer (alpha)
                        release due out next month.

                        Regards,
                        Adrian

                        • 9. Re: JMS P2P cluster load balancing
                          sashahunt

                          Adrian,

                          In your response, you said that you can do a cold
                          failover if items are persisted to the database, as
                          long as you don't have durable subscriptions. Can
                          you be more specific. Can I have no durable subscriptions to the topic? Will a manual recieve off
                          the topic get old messages when I am just connecting
                          as a nondurable subscriber? When I tried this, it
                          didn't pull them off. I was doing a test of killing one
                          application server (with JBossMQ) and having another
                          one try to pull messages off of topics populated by
                          the first one.


                          Thanks!

                          • 10. Re: JMS P2P cluster load balancing

                            Hi.

                            No messages are not sent to non-durable
                            topic subscribers when they are not connected.
                            In fact, any messages they had waiting are
                            deleted when the user disconnects.

                            To make this work for durable subscriptions,
                            we would need a state manager
                            implementation that persists to the db rather
                            than the file system.

                            Regards,
                            Adrian

                            • 11. Re: JMS P2P cluster load balancing
                              sashahunt

                              Thanks,

                              How do you implement the cold failover you
                              were talking about?

                              • 12. Re: JMS P2P cluster load balancing

                                Simply configure jdbc2 persistence
                                in jbossmq-service.xml

                                All transactions and messages are then in the
                                database.

                                Regards,
                                Adrian

                                • 13. Re: JMS P2P cluster load balancing
                                  sashahunt

                                  But they will not be delivered to a new connection that did not have a durable subscription. So how do
                                  I retrieve these old messages?

                                  Scenerio:
                                  an MDB running with a JBossMQ puts a message on
                                  topic A. That host running JBossMQ dies. A new
                                  host running another JBossMQ wants to get those
                                  messages put on topic A.

                                  • 14. Re: JMS P2P cluster load balancing

                                    You don't.

                                    Non durable topic subscriptions lose their messages
                                    if there is a disconnection.

                                    You would have to use a durable subscription,
                                    but this won't work if you boot a new instance
                                    because as I said before it won't know the
                                    subscriptions.

                                    Regards,
                                    Adrian

                                    1 2 Previous Next