HornetQ JMS ConnectionFactory Configuration

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Overview

        <subsystem xmlns="urn:jboss:domain:messaging:1.4">
            <hornetq-server>
               ...
                <jms-connection-factories>
                    ...
                    <connection-factory name="RemoteConnectionFactory">
                        <ha>true</ha>
                        <retry-interval>1000</retry-interval>
                        <retry-interval-multiplier>1.0</retry-interval-multiplier>
                        <reconnect-attempts>-1</reconnect-attempts>
                        <block-on-acknowledge>true</block-on-acknowledge>
                        <connectors>
                            <connector-ref connector-name="netty"/>
                        </connectors>
                        <entries>
                            <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
                        </entries>
                    </connection-factory>
                    ...
                </jms-connection-factories>
               ...
            </hornetq-server>
        </subsystem>

Configuration Elements

<ha>

Should be true if we want the failover to occur.

<retry-interval>

Specifies how long the client must wait (in milliseconds) before it can reconnect to the server.

<retry-interval-multiplier>

Specifies the multiplier <retry-interval> used for each subsequent reconnection pauses. By setting the value to 1.0, the retry interval is the same for each client reconnection request.

<reconnect-attempts>

Specifies how many reconnect attempts a client should make before failing. Setting -1 means unlimited reconnection attempts.