2 Replies Latest reply on Nov 21, 2014 3:47 AM by ks-appendium

    How to specifing remote host in http-connector for hornetq jms connectionfactory

    ks-appendium

      Hi,

       

      I am trying to migrate from Jboss 7.1.3.Final to wildFly 8.1.0.Final.

       

      In hornetq configuration

       

      The following use to work in 7.x


                      <connectors>

                          <connector name="netty">

                              <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                              <param key="host" value="remote-ip.x.x.x" />

                              <param key="port" value="5445" />

                              <param key="ssl-enabled" value="true" />

                          </connector>

                        ..

                      </connectors>

       

      But in wildfly 8.1.0, it ignores the host

       

      <subsystem xmlns="urn:jboss:domain:messaging:2.0">

                  <hornetq-server>

      ...

                   <connectors>

                          <http-connector name="http-connector" socket-binding="https">

                              <param key="http-upgrade-endpoint" value="http-acceptor"/>

                              <param key="ssl-enabled" value="true"/>

                              <param key="host" value="remote-ip.x.x.x" />

                          </http-connector>

                          ..

                      </connectors>


       

      It is actually getting overwritten in the class org.jboss.as.messaging.HornetQService with the following line  tc.getParams().put(HOST, host);

       

       

      Question is how do I specify a host other than jboss.bind.address for the JMSConnectionfactory? The reason why I can't use the jboss.bind.address is because wildfly is running in the virtual machine with a local/intranet ip not the public ip to reach that host.

       

       

      Thanks

        • 1. Re: How to specifing remote host in http-connector for hornetq jms connectionfactory
          jbertram

          I believe the socket-binding on the connector is overriding the host parameter you're specifying.  Try this instead:

           

              <connectors>
                  <http-connector name="http-connector" socket-binding="my-https">
                      <param key="http-upgrade-endpoint" value="http-acceptor"/>
                      <param key="ssl-enabled" value="true"/>
                  </http-connector>
                  ...
              </connectors>
          
              <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
                  ...
                  <outbound-socket-binding name="my-https">
                      <remote-destination host="remote-ip.x.x.x" port="${jboss.https.port:8443}"/>
                  </outbound-socket-binding>
              </socket-binding-group>
          
          • 2. Re: How to specifing remote host in http-connector for hornetq jms connectionfactory
            ks-appendium

            Thanks - That works.