Here is my setup:
- JBoss AS 5.1.0.GA
- JBoss Messaging 1.4.3.GA server
- Node (server) A
- Node (server) B
- Clustering is successfully working for me (i.e. nodes are finding one another correctly and applications in deploy-hasingleton as succesfully deployed/undeployed as expected)
- Both nodes have queue Q deployed in farm, with Clustered=true
- See other configuration details below
- I've read through all of the related documentation for jbossAS and jboss messaging
This is my test case:
1. Node A is running, Node B is not running
2. Send JMS messages to node A, using aaaa:1100 (HA-JNDI lookup) and custom connection factory (ServiceConnectionFactory below)
- JMX Console for Node A shows messages in queue
4. Shut down node A
5. Start up node B
6. Attempt to receive messages from node B, using same connection as above, except using bbbb:1100
- no messages are received
- JMX Console for Node B shows zero messages in queue
My question is what I might have configured incorrectly. My goal is for messages to be received at 6 above.
Here are the relevent configuration files:
- farm/jms/queue-service.xml
<server> <mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=com.mycompany.MyQueue" xmbean-dd="xmdesc/Queue-xmbean.xml"> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer </depends> <depends>jboss.messaging:service=PostOffice</depends>
<attribute name="Clustered">true</attribute>
<attribute name="SecurityConfig"> <security> <role name="my-service-queue-sub" read="true" write="false" create="false" /> <role name="my-service-queue-pub" read="false" write="true" create="false" /> </security> </attribute> </mbean></server>
- farm/jms/ServiceConnectionFactory-service.xml
<connection-factories> <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory" name="jboss.messaging.connectionfactory:service=ServiceConnectionFactory" xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml"> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer </depends> <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket </depends> <depends>jboss.messaging:service=PostOffice</depends>
<attribute name="DisableRemotingChecks">true</attribute> <attribute name="JNDIBindings"> <bindings> <binding>/ServiceConnectionFactory</binding> <binding>java:/ServiceConnectionFactory</binding> </bindings> </attribute>
<attribute name="SupportsFailover">true</attribute> <attribute name="SupportsLoadBalancing">true</attribute>
<attribute name="SlowConsumers">true</attribute> </mbean>
</connection-factories>
- deploy/messaging/messaging-service.xml
<server>
<depends optional-attribute-name="PersistenceManager">jboss.messaging:service=PersistenceManager</depends> <depends optional-attribute-name="JMSUserManager">jboss.messaging:service=JMSUserManager</depends> <depends>jboss.messaging:service=Connector,transport=bisocket</depends> <depends optional-attribute-name="SecurityStore" proxy-type="org.jboss.jms.server.SecurityStore">jboss.messaging:service=SecurityStore</depends> </mbean>
</server>
- deploy/messaging/messaging-jboss-beans.xml
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<bean name="SecurityStore" class="org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore"> </bean>
<bean name="MessagingDeploymentTemplateInfoFactory" class="org.jboss.managed.plugins.factory.DeploymentTemplateInfoFactory"/>
<bean name="QueueTemplate" class="org.jboss.profileservice.management.templates.JmsDestinationTemplate"> <property name="info"><inject bean="QueueTemplateInfo"/></property> </bean> <bean name="QueueTemplateInfo" class="org.jboss.profileservice.management.templates.JmsDestinationTemplateInfo"> <constructor factoryMethod="createTemplateInfo"> <factory bean="DSDeploymentTemplateInfoFactory"/> <parameter class="java.lang.Class">org.jboss.profileservice.management.templates.JmsDestinationTemplateInfo</parameter> <parameter class="java.lang.Class">org.jboss.jms.server.destination.QueueServiceMO</parameter> <parameter class="java.lang.String">QueueTemplate</parameter> <parameter class="java.lang.String">A template for JMS queue *-service.xml deployments</parameter> </constructor> <property name="destinationType">QueueTemplate</property> </bean>
<bean name="TopicTemplate" class="org.jboss.profileservice.management.templates.JmsDestinationTemplate"> <property name="info"><inject bean="TopicTemplateInfo"/></property> </bean> <bean name="TopicTemplateInfo" class="org.jboss.profileservice.management.templates.JmsDestinationTemplateInfo"> <constructor factoryMethod="createTemplateInfo"> <factory bean="DSDeploymentTemplateInfoFactory"/> <parameter class="java.lang.Class">org.jboss.profileservice.management.templates.JmsDestinationTemplateInfo</parameter> <parameter class="java.lang.Class">org.jboss.jms.server.destination.TopicServiceMO</parameter> <parameter class="java.lang.String">TopicTemplate</parameter> <parameter class="java.lang.String">A template for JMS topic *-service.xml deployments</parameter> </constructor> <property name="destinationType">TopicTemplate</property> </bean>
</deployment>
- deploy/messaging/oracle-persistence-service.xml
<server>
<mbean code="org.jboss.jms.server.plugin.JDBCJMSUserManagerService" name="jboss.messaging:service=JMSUserManager" xmbean-dd="xmdesc/JMSUserManager-xmbean.xml">
<depends>jboss.jca:service=DataSourceBinding,name=appserverUserDS</depends>
<depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
<attribute name="DataSource">java:/appserverUserDS</attribute>
<attribute name="CreateTablesOnStartup">false</attribute>
<attribute name="SqlProperties"><![CDATA[ ... \]\]\></attribute> </mbean>
</server>