Using Hornetq grouping-handler in a JBoss cluster with full-ha profile
janeg Nov 1, 2012 1:03 PMHi I am trying to configure the Hornetq grouping-handler into a JBoss AS 7 cluster which uses the full-HA profile.
The profile in domain.xml by default contains a single clustered hornetq server (lets call it H1):
<subsystem xmlns="urn:jboss:domain:messaging:1.1">
<hornetq-server>
<clustered>true</clustered>
I am assuming this behaves to replicate the horneq server across the JBoss servers which belong to my server-group that uses the full-HA profile
So if Ihave 2 JBoss servers S1 and S2, the hornetq server H1 is replicated to each one.
My understanding to configure grouping-handler I need to have
1. hornetq server entry containing this:
<grouping-handler name="my-grouping-handler">
<type>LOCAL</type>
2. the remaining hornetq server entries containing this:
<grouping-handler name="my-grouping-handler">
<type>REMOTE</type>
The only way I see to achieve this is to replicate the <hornetq-server> entry n times within the
<subsystem xmlns="urn:jboss:domain:messaging:1.1"> tag in the domain.xml, specifying LOCAL in only one entry and REMOTE in the others, so I will end up with H1, H2...etc.
What I do not understand is how this will achieve the intended behaviour for grouping-handler.
It is my understanding the intention by the LOCAL and REMOTE from the Hornetq manual is that you should have the following at runtime:
S1 - with H1 (LOCAL)
S2 - with H2 (REMOTE)
S3 - with H3 (REMOTE)
but given the behaviour observed in the intial full-ha profile with only H1, it seems that is more likely to be like this
S1 - with H1 (LOCAL), H2 (REMOTE), H3(REMOTE)
S2 - with H1 (LOCAL), H2 (REMOTE), H3(REMOTE)
S3 - with H1 (LOCAL), H2 (REMOTE), H3(REMOTE)
I am rather confused. Please can someone help and advise how the grouping-handler is supposed to be configured within the domain.xml so that it will function as designed?
Additionally if I am using a connection factory in a stateless session bean running in one of the cluster servers to send out messages which I want to use this grouping-handler facility, then I would want to have the message potentially routed to any one of H1, H2 or H3, which I am expecting reside on S2, S2 or S3, so does that mean I have to use a netty connector with my pooled connection factory?