Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
38.2. Dedicated Symmetrical Live and Backup Clusters
Note
$JBOSS_HOME/extras/hornetq/resources/examples/cluster-with-dedicated-backup
.
Example 38.3. Single Instance, Pure JMS, Dedicated Symmetrical Configuration
- Dedicated JCA Server, as described in Example 38.4, “Dedicated JCA Server”
- Remote JCA Server, as described in Example 38.5, “Remote JCA Server”.
38.2.1. Dedicated JCA Live Server Link kopierenLink in die Zwischenablage kopiert!
Example 38.4. Dedicated JCA Server
Procedure 38.7. Create Dedicated Live Server Profile
Important
production
profile to customize the live server configuration.
Important
- Navigate to
$JBOSS_HOME/server/
- Copy the
production
profile, and rename it toHornetQ_Dedicated
Procedure 38.8. Configure Shared Store and Journaling
- Navigate to
$JBOSS_HOME/server/HornetQ_Dedicated/deploy/hornetq/
- Open
hornetq-configuration.xml
- Add the <shared-store> element as a child of the <configuration> element.
<shared-store>true</shared-store>
<shared-store>true</shared-store>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Ensure the bindings, journal, and large messages path locations are set to a location the live backup group can access.You can set absolute paths as the example describes, or use the JBoss parameters that exist in the configuration file.If you choose the parameter option, and you do not use the default paths that these parameters resolve to, you must specify the path your bindings, journal, and large messages reside in each time you start the server.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Ensure you specify paths that are accessible to the live backup groups on your network.
Procedure 38.9. Configure JMS Client Graceful Shutdown
- Navigate to
$JBOSS_HOME/server/HornetQ_Dedicated/deploy/hornetq/
- Open
hornetq-configuration.xml
- Specify the <fail over-on-shutdown> element in the area near the journal directory configuration in Procedure 38.2, “Configure Shared Store and Journaling”.
<failover-on-shutdown>true</failover-on-shutdown>
<failover-on-shutdown>true</failover-on-shutdown>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
You are not constrained where you put the element in thehornetq-configuration.xml
file, however it is easier to find the less detailed settings if they are all located at the top of the file. - Save and close the file.
Procedure 38.10. Configure HA Connection Factories
- Navigate to
$JBOSS_HOME/server/HornetQ_Dedicated/deploy/hornetq/
- Open
hornetq-jms.xml
. - Add the following attributes and values as specified below.
- <ha>true</ha>
- Specifies the client must support high availability, and must always be true for fail over to occur.
- <retry-interval>1000</retry-interval>
- Specifies how long the client must wait (in milliseconds) before it can reconnect to the server.
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
- Specifies the multiplier <retry-interval> uses 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>-1</reconnect-attempts>
- Specifies how many reconnect attempts a client should make before failing. Setting
-1
means unlimited reconnection attempts.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Define new queues in both master and backup nodes by adding one of the following configuration blocks to the specified file.For
production/deploy/hornetq/hornetq-jms.xml
<queue name="testQueue"> <entry name="/queue/testQueue"/> <durable>true</durable> </queue>
<queue name="testQueue"> <entry name="/queue/testQueue"/> <durable>true</durable> </queue>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Forproduction/deploy/customName-hornetq-jms.xml
Note
Ensure the file is well-formed from an XML validation perspective by ensure the XML Namespace is present and correct in the file as specified.Copy to Clipboard Copied! Toggle word wrap Toggle overflow