users@glassfish.java.net

How to configure JMS in cluster mode where messages produced and consumed on the same node

From: saikiranp <saikiran.penubolu_at_aricent.com>
Date: Fri, 27 Aug 2010 04:25:33 -0700 (PDT)

Hi All,
  I have setup sailfin in cluster (my-cluster) mode as below.

machine 1 : my-domain, agent1, instance1
machine 2 : agent2, instance 2

I have create a queue "MyQueue" and its corresponding resources by using the
following command.

create-jmsdest --desttype queue --target my-cluster MyQueue
create-jms-resource --target my-cluster --restype
javax.jms.QueueConnectionFactory jms/MyQcf
create-jms-resource --target my-cluster --restype javax.jms.Queue --property
imqDestinationName=MyQueue jms/MyQueue

So the configurations if the JMS Service looks as follows.

Type: LOCAL
Address List Behavior: Priority

I created on MDB listener and deployed it on the cluster. When i send some
10 message to the queue , some are delivered to listener on instance-1 and
some other are delivered to listener on instance-2.

i mean 1, 3, 7, 8 & 10 are delivered on instance 1 and 2, 4, 5, 6 & 9 are
delivered on instance-2.

But as per the Sun GlassFish Enterprise Server 2.1 Developer's Guide , if i
set the behaviour as priority and type as local, it should behave as "This
ensures colocated production and consumption of messages and equitable load
distribution across the Message Queue broker cluster".

But my test shows that it is not behaving as specified in the document.

How can i configure it, so that the messages will be consumed on the same
node where i am producing the messages?

Thanks
Saikiran
-- 
View this message in context: http://old.nabble.com/How-to-configure-JMS-in-cluster-mode-where-messages-produced-and-consumed-on-the-same-node-tp29551597p29551597.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.