HornetQ JMS ConnectionFactory Configuration: Difference between revisions
No edit summary |
No edit summary |
||
Line 67: | Line 67: | ||
Note that the load balancing is '''not''' round-robin: successive messages may be sent to the same node. | Note that the load balancing is '''not''' round-robin: successive messages may be sent to the same node. | ||
==<tt><call-timeout></tt>== | |||
{{External|https://access.redhat.com/solutions/318693}} |
Latest revision as of 19:09, 26 June 2017
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. Example:
<connection-factory name="RemoteConnectionFactory"> <connectors> <connector-ref connector-name="local-netty"/> <connector-ref connector-name="node2-connector"/> <connector-ref connector-name="node3-connector"/> </connectors> ... </connection-factory>
where the connector names correspond to connectors declared in the <connectors> section of the configuration.
Note that the load balancing is not round-robin: successive messages may be sent to the same node.