7 Replies Latest reply on Feb 10, 2016 10:58 AM by jamat

    wildfly: jgroups-channel question

    jamat

      Hello,

      I saw this ticket:

       

      [WFLY-5458] jgroups-stack & jgroups-channel attributes should not allow expressions - JBoss Issue Tracker

       

      and I am wondering why we cannot have expression here.

       

      We use to have an application in JBoss EAP 6.4 where we used something like:

                          <discovery-group name="dg-group1">

                              <jgroups-stack>tcp</jgroups-stack>

                              <jgroups-channel>${my.clusterId}</jgroups-channel>

                              <refresh-timeout>10000</refresh-timeout>

                          </discovery-group>

      and it was just a matter of providing the correct property when starting JBoss.

      Now we cannot do that in wildfly and I am not sure why we can't. The ticket is not that clear to me.

        • 1. Re: wildfly: jgroups-channel question
          jamat

          Somehow related this is a good read: https://github.com/wildfly/wildfly/pull/8221

           

          As noted there the names are confusing and what they do (depending on the fact that jgroups-stack is configured or not) is not obvious.

          But still even this page does not explain why we could not configure them via expressions.

          • 2. Re: wildfly: jgroups-channel question
            pferraro

            The name confusion is addressed by: https://issues.jboss.org/browse/WFLY-5459

             

            In WildFly, <jgroups-channel/> references a channel defined in the jgroups subsystem.  This is a model reference, hence expressions are not allowed.

            • 3. Re: wildfly: jgroups-channel question
              jamat

              Are you sure?

              The default standalone-full-ha.xml is configured like this:

               

                              <broadcast-group name="bg-group1" connectors="http-connector" jgroups-channel="activemq-cluster"/>

                              <discovery-group name="dg-group1" jgroups-channel="activemq-cluster"/>

               

              bu the jgroups subsystem only has the 'ee' channel:

               

                      <subsystem xmlns="urn:jboss:domain:jgroups:4.0">

                          <channels default="ee">

                              <channel name="ee" stack="udp"/>

                          </channels>

               

              and this works fine.

               

              I guess I did not understand what you say.

              In the above configuration what is the harm to replace 'activemg-cluster' with ${my.clusterId} ?

              • 4. Re: wildfly: jgroups-channel question
                pferraro

                My bad - we changed the name (via WFLY-5459).  jgroups-channel was renamed to jgroups-channel-factory.  jgroups-channel refers to the distinct name of the channel created from that factory.  When undefined, this defaults to the default channel factory as defined in the jgroups subsystem (i.e. the "ee" channel factory, which creates a fork channel based on the "ee" channel).

                • 5. Re: wildfly: jgroups-channel question
                  jamat

                  I am still confused. WLFY-5459 is not resovled yet AFAIK. And my comment was for the Wildlfy 10.0.0.0 Final.

                  So you mean that WLFY-5459 will not just be a rename but a semantic change? (by that I mean that the old jgroups-channel will be renamed jgroups-channel-factorry and that its value should be defined in <channels> element of the jgroups subsystem?)

                  As I said I am confused.

                  IOW how would the standalone-full-ha.xml be modified to have the same exact behavior?

                  • 6. Re: wildfly: jgroups-channel question
                    pferraro

                    Whoops - I didn't realize that we never completed WFLY-5459.  Let me start again...

                    It actually looks like there is a bug here - only jgroups-stack is a model reference (it refers to a channel factory).  jgroups-channel is not a model reference - and thus should allow expressions.  This was initially changed by [WFLY-5458] jgroups-stack & jgroups-channel attributes should not allow expressions - JBoss Issue Tracker.

                    I've opened [WFLY-6166] jgroups-channel attribute should allow expressions. - JBoss Issue Tracker to rectify this.  I'll see about renaming these attributes at the same time.

                    • 7. Re: wildfly: jgroups-channel question
                      jamat

                      OK good.

                      Sorry about my persistence as I can be a one track mind.

                      I do appreciate your work and your responsiveness.