Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hchoroomi/3156614 to your computer and use it in GitHub Desktop.
Save hchoroomi/3156614 to your computer and use it in GitHub Desktop.
Torquebox production setup
<cluster-user>admin</cluster-user>
<cluster-password>mypassword</cluster-password>
<cluster-connections>
<cluster-connection name="cluster-prod">
<address>jms</address>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>false</forward-when-no-consumers>
<max-hops>1</max-hops>
<connector-ref connector-name="netty-ssl-connector-master"/>
</cluster-connection>
</cluster-connections>
<acceptor name="netty-ssl-acceptor">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="192.168.0.1"/>
<param key="port" value="1234"/>
<param key="ssl-enabled" value="true"/>
<param key="key-store-path" value="${jboss.server.home.dir}/conf/sample.keystore"/>
<param key="key-store-password" value="mypassword"/>
<param key="trust-store-path" value="${jboss.server.home.dir}/conf/sample.truststore"/>
<param key="trust-store-password" value="mypassword"/>
</acceptor>
<connector name="netty-ssl-connector-master">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="192.168.0.1"/>
<param key="port" value="1234"/>
<param key="ssl-enabled" value="true"/>
<param key="key-store-path" value="${jboss.server.home.dir}/conf/sample.keystore"/>
<param key="key-store-password" value="mypassword"/>
</connector>
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
<cluster-user>admin</cluster-user>
<cluster-password>mypassword</cluster-password>
<log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
<bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
<journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
<!-- Default journal file size is set to 1Mb for faster first boot -->
<journal-file-size>${hornetq.journal.file.size:1048576}</journal-file-size>
<!-- Default journal min file is 2, increase for higher average msg rates -->
<journal-min-files>${hornetq.journal.min.files:2}</journal-min-files>
<large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
<paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
<connectors>
<connector name="netty-ssl-connector-master">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="192.168.0.1"/>
<param key="port" value="5445"/>
<param key="ssl-enabled" value="true"/>
<param key="key-store-path" value="${jboss.server.home.dir}/conf/sample_keystore.jks"/>
<param key="key-store-password" value="mypassword"/>
</connector>
<connector name="in-vm">
<factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
<param key="server-id" value="${hornetq.server-id:0}"/>
</connector>
</connectors>
<!-- Acceptors -->
<acceptors>
<acceptor name="netty-ssl-acceptor-slave1">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="192.168.0.2"/>
<param key="port" value="5445"/>
<param key="ssl-enabled" value="true"/>
<param key="key-store-path" value="${jboss.server.home.dir}/conf/sample_keystore.jks"/>
<param key="key-store-password" value="mypassword"/>
<param key="trust-store-path" value="${jboss.server.home.dir}/conf/sample_truststore.jks"/>
<param key="trust-store-password" value="mypassword"/>
</acceptor>
<acceptor name="in-vm">
<factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
<param key="server-id" value="0"/>
</acceptor>
</acceptors>
<cluster-connections>
<cluster-connection name="cluster-prod">
<address>jms</address>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>false</forward-when-no-consumers>
<max-hops>1</max-hops>
<connector-ref connector-name="netty-ssl-connector-master"/>
</cluster-connection>
</cluster-connections>
<!-- Other config -->
<security-settings>
<!--security for example queue-->
<security-setting match="#">
<permission type="createDurableQueue" roles="guest"/>
<permission type="deleteDurableQueue" roles="guest"/>
<permission type="createNonDurableQueue" roles="guest"/>
<permission type="deleteNonDurableQueue" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
</security-settings>
<address-settings>
<!--default for catch all-->
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
</address-setting>
</address-settings>
</configuration>
<connection-factory name="ConnectionFactory">
<connectors>
<connector-ref connector-name="netty-ssl-connector-master"/>
</connectors>
<entries>
<entry name="ConnectionFactory"/>
</entries>
</connection-factory>
<!-- SSL/TLS Connector configuration using the admin devl guide keystore -->
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="${jboss.web.https.port}" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
keystorePass="rmi+ssl" sslProtocol = "TLS" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment