HornetQ 2.3.0 RA + JGroups
jmesnil Jan 9, 2013 11:39 AMFor AS7-6124, I want to use JGroups with HornetQ RA.
I updated AS7 integration code so that the RA would use the same JChannel that is created when a discovery-group is configured with JGroups.
It does *not* create a new JChannel object for the RA (otherwise JGroups complains that I can't connect twice to a singleton transport).
I have a test that does not pass with that modification and I can't find the reason yet.
Could one of you give an eye on it and check that I'm not doing anything stupid?
The AS7 branch is at https://github.com/jmesnil/jboss-as/tree/AS7-6124_messaging_jgroups_in_RA and uses hornetq master branch (not 2.3.0.BETA3 tag).
1. build AS7 with "mvn clean install"
2. copy https://gist.github.com/4494044 standalone-full.xml file to AS7 build/target/jboss-as-7.2.0.Alpha1-SNAPSHOT/standalone/configuration/standalone-full.xml
This conf use HornetQ's own UDP stack by default ("dg-group1")
3. run the test with ./integration-tests.sh -Dts.smoke -Dtest=org.jboss.as.test.smoke.jms.SendToQueueFromWithinTransactionTest
=> the test will fail with an error: "No, the test did pass but I wanted to see the test output". This means the test passed but I fail it at the end to keep the logs
4. modify AS7 build/target/jboss-as-7.2.0.Alpha1-SNAPSHOT/standalone/configuration/standalone-full.xml to use the JGroups stack for discovery by using "dg-group2" instead of "dg-group1" for the "hornetq-ra" pooled-connection-factory (https://gist.github.com/4494044#file-standalone-full-xml-L384)
=> the test now really fails because the discovery group never receive the broadcast group data.
dg-group2 is using the default UDP stack from JGroups which should work without any modification out of the box.
Could one of you give the test a try to see if my issue is environmental (unlikely since HornetQ's own UDP stack is working) or if there is something else going on?
The relevant code in AS7 is in HornetQService when the JChannel object is created[1] and JGroupsChannelLocator[2] that is called back by the HornetQ RA to get a reference on this channel. The RA has specific properties for that[3].