Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run two standalone HornetQ servers on same machine

How can i run two standalone hornetq servers on same machine? which configuration should be changed? (i.e. Which ports)? And how to connect their JNDI servers?

My jndiTemplate bean (in applicationContext.xml) (Should i use two jndiTemplates for each server?):

<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
        <props>
            <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
            <prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
            <prop key="java.naming.provider.url">jnp://localhost:1099</prop>
        </props>
    </property>
</bean>
like image 360
Arya Avatar asked Dec 01 '25 18:12

Arya


1 Answers

In your hornetq home directory are two files you should modify. I'll use the default path when using hornetq stand-alone:

  • config/stand-alone/non-clustered/hornetq-beans.xml

Change the jndi port here (1099/1098)

  • config/stand-alone/non-clustered/hornetq-configuration.xml

Change the netty port here (5445)

like image 112
Dag Avatar answered Dec 03 '25 18:12

Dag



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!