[jboss-user] [JBoss Messaging] - Re: Clustered server preference

chip_schoch do-not-reply at jboss.com
Thu Apr 17 09:36:13 EDT 2008


I hate to belabor the point but it seems you are not quite understanding what I am after.  Let me try again.

Here is what I see.

My producer is connected to appserver1.  Here is the serverLocatorURI from the factory via the debugger:

bisocket://172.17.20.60:4457/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat

Consumer 1 is connected to appserver1:
bisocket://172.17.20.60:4457/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat
Consumer 2 is connected to appserver2:
bisocket://172.17.20.61:4457/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat

All are using this connectionfactory:


  |    <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
  |       name="jboss.messaging.connectionfactory:service=NoLoadBalanceConnectionFactory"
  |       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="JNDIBindings">
  |          <bindings>
  |             <binding>/NoLoadBalanceConnectionFactory</binding>
  |             <binding>/XANoLoadBalanceConnectionFactory</binding>
  |             <binding>java:/NoLoadBalanceConnectionFactory</binding>
  |             <binding>java:/XANoLoadBalanceConnectionFactory</binding>
  |          </bindings>
  |       </attribute>
  | 		  <attribute name="PrefetchSize">1</attribute> 
  | 		  <attribute name="SlowConsumers">true</attribute> 
  |       <attribute name="SupportsFailover">false</attribute>
  |       <attribute name="SupportsLoadBalancing">false</attribute>    
  |    </mbean>

Set DefaultPreserveOrdering=true on the servers
   
Post 5 messages:
[2008-04-17 09:18:54,613] INFO  - Queueing message: Test_Message_0 
  | [2008-04-17 09:18:54,660] INFO  - Queueing message: Test_Message_1 
  | [2008-04-17 09:18:54,675] INFO  - Queueing message: Test_Message_2 
  | [2008-04-17 09:18:54,691] INFO  - Queueing message: Test_Message_3 
  | [2008-04-17 09:18:54,722] INFO  - Queueing message: Test_Message_4 
  | [2008-04-17 09:20:39,393] INFO  - Listener_2 received message: Test_Message_0 
  | [2008-04-17 09:20:40,440] INFO  - Listener_2 received message: Test_Message_1 
  | [2008-04-17 09:20:41,456] INFO  - Listener_2 received message: Test_Message_2 
  | [2008-04-17 09:20:42,487] INFO  - Listener_2 received message: Test_Message_3 
  | [2008-04-17 09:20:43,519] INFO  - Listener_2 received message: Test_Message_4
  | 
  | 
  | I get message ordering but no client load balancing, as expected.  
  | But why is Listener_2 getting the messages and not Listener_1?  I verified that the messages were put on appserver1 by stopping before creating the consumers and using the jmx-console to see the message count.  I also verified that after creating the consumers each appserver had one consumer.
  | 
  | My desired result is that I get message ordering and both listeners consume the messages.
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144852#4144852

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144852



More information about the jboss-user mailing list