-
1. Re: Clustering HornetQ in AS7
jcrossley Jul 15, 2011 2:50 PM (in response to jcrossley)It doesn't seem to be enough to add <clustered>true</clustered> to the messaging subsystem inside standalone.xml. Using the hornetq-configuration.xml from AS6 as a guide, apparently I need to define some discovery-groups and cluster-connections to achieve the message load-balancing behavior, but the MessagingSubsystemParser barfs on those elements.
What am I missing?
-
2. Re: Clustering HornetQ in AS7
clebert.suconic Jul 15, 2011 3:38 PM (in response to jcrossley)You will need to add the cluster-connection, yes...
take a look at our hornetq standalone distribution, under hornetq-2.2.5.Final/config/stand-alone/clustered for how to add it.
If it doesn't work we will need to figure out what's going on.
Andy Taylor should be able to give us some insight here also.
-
3. Re: Clustering HornetQ in AS7
viniciuscarvalho Jul 18, 2011 7:57 AM (in response to clebert.suconic)Hi guys, I'm facing the same issue here. I read the example from stand-alone, and add the following lines to my standalone-preview-ha.xml on JBoss 7:
<broadcast-groups> <broadcast-group name="bg-group1"> <group-address>231.7.7.7</group-address> <group-port>9876</group-port> <broadcast-period>5000</broadcast-period> <connector-ref>netty</connector-ref> </broadcast-group> </broadcast-groups> <discovery-groups> <discovery-group name="dg-group1"> <group-address>231.7.7.7</group-address> <group-port>9876</group-port> <refresh-timeout>10000</refresh-timeout> </discovery-group> </discovery-groups> <cluster-connections>
<cluster-connection name="my-cluster"> <address>jms</address> <connector-ref>netty</connector-ref> <discovery-group-ref discovery-group-name="dg-group1"/> </cluster-connection> </cluster-connections> But I get an exception by Jboss XML parser:
12:42:20,278 ERROR [stderr] Exception in thread "Controller Boot Thread" java.lang.RuntimeException: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration
12:42:20,279 ERROR [stderr] at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:89)
12:42:20,280 ERROR [stderr] at java.lang.Thread.run(Thread.java:619)
12:42:20,280 ERROR [stderr] Caused by: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration
12:42:20,280 ERROR [stderr] at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:115)
12:42:20,280 ERROR [stderr] at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:104)
12:42:20,281 ERROR [stderr] at org.jboss.as.server.ServerService.boot(ServerService.java:193)
12:42:20,281 ERROR [stderr] at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:83)
12:42:20,281 ERROR [stderr] ... 1 more
12:42:20,281 ERROR [stderr] Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[306,7]
12:42:20,281 ERROR [stderr] Message: Unexpected element '{urn:jboss:domain:messaging:1.0}broadcast-groups' encountered
Which is kinda acward since I've checked the schema at $JBOSS_HOME\docs\schema\jboss-messaging.xsd and
<xs:element maxOccurs="1" minOccurs="0" name="broadcast-groups">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="broadcast-group" type="broadcast-groupType" />
</xs:sequence>
</xs:complexType>
</xs:element>
Any ideas on how to get this running?
Regards
-
4. Re: Clustering HornetQ in AS7
penumbraposts Oct 12, 2011 11:16 PM (in response to jcrossley)This is how I clustered using standalone mode - two instances of JBoss AS 7 running on the same host
-
5. Re: Clustering HornetQ in AS7
clebert.suconic Oct 13, 2011 12:24 AM (in response to viniciuscarvalho)@Vinicius: Can you add the whole file here. I'm not sure what you're missing.
Use advanced editor-> attach file.
-
6. Re: Clustering HornetQ in AS7
penumbraposts Oct 30, 2011 4:14 PM (in response to clebert.suconic)With some help from the TorqueBox lead, Bob McWhirter, HornetQ is clustering in domain mode with the following: