(similar problem: 
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=103248&postdays=0&postorder=asc&start=0)

I'm experiencing problems with the message redistribution between the cluster 
nodes. I'm running two server nodes jboss-4.2.0.GA with 
jboss-messaging-1.4.0.SP2 
(http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP2/html/installation.html#install.automated).

If the producer connects to one node, but the consumer on the another one it 
does not receive nothing from the queue. The queue is marked clustered in 
destinations-service.xml:


  |    <mbean code="org.jboss.jms.server.destination.QueueService"
  |       name="jboss.messaging.destination:service=Queue,name=TestService"
  |       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>
  |    </mbean>
  | 

The clients are using HA-JNDI to lookup the ClusteredConnectionFactory.
Here is the list of jars used at the client side:

  | ...
  | @rem this one is a fixed version (?) obtained from 
http://jira.jboss.org/jira/browse/JBPAPP-402?page=history
  | @set CP=%CP%;%JBOSS_HOME%/server/messaging-node0/lib/jboss-remoting.jar
  | 
  | @set 
CP=%CP%;D:\research\MessageBus\JBossMQ\jboss-messaging-1.4.0.SP2\jboss-messaging-client.jar
  | @set CP=%CP%;%JBOSS_HOME%/client/jbossall-client.jar
  | 
  | @rem obtained from http://repository.jboss.com/jboss/aop/1.5.5.GA/lib/
  | @set CP=%CP%;./lib/jboss-aop.jar
  | 
  | @rem obtained from http://repository.jboss.com/javassist/3.5.0.GA-brew/lib/
  | @set CP=%CP%;./lib/javassist.jar
  | 
  | @rem obtained from http://repository.jboss.com/trove/1.0.2-brew/lib/
  | @set CP=%CP%;./lib/trove.jar 
  | 
  | @set CP=%CP%;%JBOSS_HOME%/client/log4j.jar
  | ...
  | 

As I look at "JBoss Messaging 1.3 User's Guide" 
(http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.3.0.GA/html/index.html)
   
 section "7.3.2. Clustered post office" describes two interesting attributes:

  |  <mbean code="org.jboss.messaging.core.plugin.ClusteredPostOfficeService"
  |       name="jboss.messaging:service=PostOffice"
  |       xmbean-dd="xmdesc/ClusteredPostOffice-xmbean.xml">
  | ...
  | <!-- To favour the local queue -->
  | <attribute 
name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory</attribute>
  | <!-- To round robin 
  | <attribute 
name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.RoundRobinRouterFactory</attribute>
  | -->
  |      
  | <!-- For message redistribution -->
  | <attribute 
name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultMessagePullPolicy</attribute>
  | <!-- For no message redistribution
  | <attribute 
name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy</attribute>
  | -->
  | 
(Note that adding the above configuration does not work..)

I need them in order to make something like a master/slave configured cluster 
of two nodes where:

  | - consumers and producers are external (not running inside jboss cluster), 
jboss is used only as a messaging system
  | - the messaging system should provide transperant failover (jboss messaging 
already does)
  | - only the master node is used by default (runs on a better hardware box)
  | 
  |   | Hashtable properties = new Hashtable();
  |   | properties.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  |   | properties.put(Context.URL_PKG_PREFIXES, 
"org.jboss.naming:org.jnp.interfaces");
  |   | properties.put(Context.PROVIDER_URL, "master:1200,slave:1300");
  |   | Context context = new InitialContext(properties);
  |   | ConnectionFactory connectionFactory = (ConnectionFactory) 
context.lookup("/ClusteredConnectionFactory");
  |   | 
  | 
  |   | <!-- To favour the local queue -->
  |   | <attribute 
name="ClusterRouterFactory">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory</attribute>
  |   | 
  | - if there are producers and consumers connected to different nodes in the 
cluster they should continue running without any knowledge of what is actually 
happening
  | 
  |   | <!-- For message redistribution -->
  |   | <attribute 
name="MessagePullPolicy">org.jboss.messaging.core.plugin.postoffice.cluster.DefaultMessagePullPolicy</attribute>
  |   | 
  | - if the master dies and is restarted then the slave should also be 
restarted in order to recover the inital state (using only the master node)
  | 
  | 
  | So, currently the problem is that I do not see nothing about this Clustered 
post office from JBoss Messaging 1.3 into
  | "JBoss Messaging 1.4 User's Guide" 
(http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP2/html/index.html)
  | and do not know how to achieve the To favour the local queue via 
ClusterRouterFactory attribute and For message redistribution via 
MessagePullPolicy attribute.
  | 
  | Could you please help?
  | 
  | thanks,
  | bobrin
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112636
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to