Title: About HornetQ Shared Stores Describe the issue: We need to provide step by step guide how to configure HA for HornetQ. There should be described: 1. HA topologies - dedicated vs. collocated 2. Step by step guide how to configure dedicated HA topology with shared store 3. Step by step guide how to configure collocated HA topology with shared store For 1. read doc [1] and [2] For 2. here is example configuration: Live server: <subsystem xmlns="urn:jboss:domain:messaging:1.3"> <hornetq-server> ... <failover-on-shutdown>true</failover-on-shutdown> <shared-store>true</shared-store> <journal-type>ASYNCIO</journal-type> ... <paging-directory path="<path_to_shared_journal_folder>/paging"/> <bindings-directory path="<path_to_shared_journal_folder>/bindings"/> <journal-directory path="<path_to_shared_journal_folder>/journal"/> <large-messages-directory path="<path_to_shared_journal_folder>/large-messages"/> ... <jms-connection-factories> ... <!-- example of connection factory with HA enabled, just for JMS clients --> <connection-factory name="RemoteConnectionFactory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> </entries> <ha>true</ha> <block-on-acknowledge>true</block-on-acknowledge> <retry-interval>1000</retry-interval> <retry-interval-multiplier>1.0</retry-interval-multiplier> <reconnect-attempts>-1</reconnect-attempts> </connection-factory> ... </jms-connection-factories> ... </hornetq-server> </subsystem> Backup server: <subsystem xmlns="urn:jboss:domain:messaging:1.3"> <hornetq-server> ... <backup>true</backup> <allow-failback>true</allow-failback> <failover-on-shutdown>true</failover-on-shutdown> <shared-store>true</shared-store> <journal-type>ASYNCIO</journal-type> ... <paging-directory path="<path_to_shared_journal_folder>/paging"/> <bindings-directory path="<path_to_shared_journal_folder>/bindings"/> <journal-directory path="<path_to_shared_journal_folder>/journal"/> <large-messages-directory path="<path_to_shared_journal_folder>/large-messages"/> <jms-connection-factories> ... <connection-factory name="RemoteConnectionFactory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> </entries> <ha>true</ha> <block-on-acknowledge>true</block-on-acknowledge> <retry-interval>1000</retry-interval> <retry-interval-multiplier>1.0</retry-interval-multiplier> <reconnect-attempts>-1</reconnect-attempts> </connection-factory> ... </jms-connection-factories> ... </hornetq-server> </subsystem> For 3. here is example configuration: First Live/Backup pair: <subsystem xmlns="urn:jboss:domain:messaging:1.3"> <!-- live server of first live/backup pair --> <hornetq-server> ... <persistence-enabled>true</persistence-enabled> <shared-store>true</shared-store> <journal-type>ASYNCIO</journal-type> <paging-directory path="<path_to_first_shared_journal_folder>/paging"/> <bindings-directory path="<path_to_first_shared_journal_folder>/bindings"/> <journal-directory path="<path_to_first_shared_journal_folder>/journal"/> <large-messages-directory path="<path_to_first_shared_journal_folder>/large-messages"/> ... <jms-connection-factories> ... <connection-factory name="RemoteConnectionFactory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> </entries> <ha>true</ha> <block-on-acknowledge>true</block-on-acknowledge> <retry-interval>1000</retry-interval> <retry-interval-multiplier>1.0</retry-interval-multiplier> <reconnect-attempts>-1</reconnect-attempts> </connection-factory> ... </jms-connection-factories> ... <jms-destinations> <jms-queue name="testQueue0"> <entry name="jms/queue/testQueue0"/> <entry name="java:jboss/exported/jms/queue/testQueue0"/> <durable>true</durable> </jms-queue> <jms-topic name="testTopic0"> <entry name="jms/topic/testTopic0"/> <entry name="java:jboss/exported/jms/topic/testTopic0"/> </jms-topic> </jms-destinations> </hornetq-server> <!-- backup server of second live/backup pair --> <hornetq-server name="backup"> ... <persistence-enabled>true</persistence-enabled> <backup>true</backup> <allow-failback>true</allow-failback> <failover-on-shutdown>true</failover-on-shutdown> <shared-store>true</shared-store> <journal-type>ASYNCIO</journal-type> <paging-directory path="<path_to_second_shared_journal_folder>/paging"/> <bindings-directory path="<path_to_second_shared_journal_folder>/bindings"/> <journal-directory path="<path_to_second_shared_journal_folder>/journal"/> <large-messages-directory path="<path_to_second_shared_journal_folder>/large-messages"/> <connectors> ... <netty-connector name="netty-backup" socket-binding="messaging-backup"/> ... </connectors> <acceptors> ... <netty-acceptor name="netty-backup" socket-binding="messaging-backup"/> ... </acceptors> <broadcast-groups> ... <broadcast-group name="bg-group-backup"> <socket-binding>messaging-group</socket-binding> <broadcast-period>2000</broadcast-period> <connector-ref> netty-backup </connector-ref> </broadcast-group> ... </broadcast-groups> <discovery-groups> ... <discovery-group name="dg-group-backup"> <socket-binding>messaging-group</socket-binding> <refresh-timeout>10000</refresh-timeout> </discovery-group> ... </discovery-groups> <cluster-connections> <cluster-connection name="my-cluster"> <address>jms</address> <connector-ref>netty-backup</connector-ref> <retry-interval>1000</retry-interval> <use-duplicate-detection>true</use-duplicate-detection> <forward-when-no-consumers>false</forward-when-no-consumers> <max-hops>1</max-hops> <discovery-group-ref discovery-group-name="dg-group-backup"/> </cluster-connection> </cluster-connections> ... <jms-destinations> <jms-queue name="testQueue0"> <entry name="jms/queue/testQueue0"/> <entry name="java:jboss/exported/jms/queue/testQueue0"/> <durable>true</durable> </jms-queue> <jms-topic name="testTopic0"> <entry name="jms/topic/testTopic0"/> <entry name="java:jboss/exported/jms/topic/testTopic0"/> </jms-topic> </jms-destinations> </hornetq-server> </subsystem> ... <!-- configure socket binding for HornetQ backup of second live/backup pair --> <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> ... <socket-binding name="messaging-backup" port="5446"/> ... </socket-binding-group> Second Live/Backup pair configuration is equivalent. Only difference is in <path_to_first_shared_journal_folder> and <path_to_second_shared_journal_folder>. HornetQ live server has <path_to_second_shared_journal_folder>. HornetQ backup server has <path_to_first_shared_journal_folder>. [1] http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5/html-single/HornetQ_User_Guide/index.html [2] http://docs.jboss.org/hornetq/2.3.0.Final/docs/user-manual/html_single/index.html
The should be done for replicated journal. (message replication)
This looks like a duplicate of 985851, or their requirements at least overlap each other.
This bug is pretty old now, and as a consequence I think all this has already been covered by BZ 927867. *** This bug has been marked as a duplicate of bug 927867 ***