1 Reply Latest reply on Jul 28, 2010 11:17 AM by jmesnil

    InVM server-id meaning clarification

    vkopichenko

      HornetQ 2.1 User Manual mentions server-id only once without explanation.

      There is an issue https://jira.jboss.org/browse/HORNETQ-268 saying "When clustering, it is required that each server have a unique serverid set".

      So, my initial guess was that it's analog to JBM's ServerPeerID. But then why it's required only for invm, but not netty connections?

       

      Then I've found a thread http://community.jboss.org/message/552705#552705 stating that HornetQ uses autogenerated node ids.

      So, the second guess is that server-id is used only to differentiate multiple connections in the same JVM.

      This is totally different thing.

      It means that in vast majority of use cases (including jboss clusters) there's no need to alter server-id from default value of 0.

      This should be cleared in docs.

       

      I've tried running several cluster nodes with the same server-id. Everything seemed to work ok.

      It was JBoss 4.2.3.GA with hornetq-2.1.1.Final and InVM connetion configured for jca resouce adapter in jms-ra.rar\META-INF\ra.xml.

        • 1. Re: InVM server-id meaning clarification
          jmesnil

          Vadim Kopichenko wrote:

           

          HornetQ 2.1 User Manual mentions server-id only once without explanation.

          There is an issue https://jira.jboss.org/browse/HORNETQ-268 saying "When clustering, it is required that each server have a unique serverid set".

          So, my initial guess was that it's analog to JBM's ServerPeerID. But then why it's required only for invm, but not netty connections?

           

          Then I've found a thread http://community.jboss.org/message/552705#552705 stating that HornetQ uses autogenerated node ids.

          So, the second guess is that server-id is used only to differentiate multiple connections in the same JVM.

          This is totally different thing.

          It means that in vast majority of use cases (including jboss clusters) there's no need to alter server-id from default value of 0.

          This should be cleared in docs.

          You understood correctly.

           

          I'll ad a section in the transport chapter about invm transport and make it clear that server-id is only used to distinguish between different HornetQ servers run in the same VM and is not related to clustering.