JBoss 5 Cluster as a Long-Term JMS Server Problem

I have a pair of JBoss 5.1 servers grouped together to act as a fault-tolerant JMS server.

I configured them to use the MySQL data warehouse (with the clustering option enabled in mysql-persistence-service.xml), I created the mbean theme in destination-service.xml, specifying:

   <mbean code="org.jboss.jms.server.destination.TopicService" name="jboss.messaging.destination:service=Topic,name=ECM-PRM-Topic" xmbean-dd="xmdesc/Topic-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="ecm-role" write="true" />
                    <role name="prm-role" read="true" create="true" />
            </security>
    </attribute>

My client (J2SE!) Connects to these JMS servers using:

            // Step 1. Create an initial context to perform the JNDI lookup.
        initialContext = new InitialContext(p);
        // Step 3. Perform a lookup on the Connection Factory
        ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ClusteredConnectionFactory");
        // Step 2. Perfom a lookup on the queue
        Destination target = (Destination)initialContext.lookup("/topic/ECM-PRM-Topic");

When the following sequence of events occurs:

  • Node1 node, Node2 node down.
  • The client connects to the JMS and creates a reliable subscriber on the topic "ECM-PRM-Topic".
  • The client disconnects, leaving a long-term subscription.
  • Some other customers post on the topic "ECM-PRM-Topic".
  • Node1 node is down.
  • Node2 rises.
  • "ECM-PRM-Topic" .
  • .
  • Node 1 .
  • .

, 4, ( MySQL), . ()

node, 6, - . (??)

, 7, . ( )

8, ( MySQL ).

10 7, .

100% , . MySQL , .

, ?

JBoss XML ( , - DurableSubscriber)?

, ,

+3
1
+1

Source: https://habr.com/ru/post/1726356/


All Articles