HornetQ JMS ConnectionFactory Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 48: Line 48:


Specifies how many reconnect attempts a client should make before failing. Setting -1 means unlimited reconnection attempts.
Specifies how many reconnect attempts a client should make before failing. Setting -1 means unlimited reconnection attempts.
==<tt><connectors></tt>==
Specifies the connectors (HornetQ nodes) this connection factory will load balance messages amongst.

Revision as of 01:25, 14 May 2016

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.

<connectors>

Specifies the connectors (HornetQ nodes) this connection factory will load balance messages amongst.