Tuesday, April 19, 2011

Distributed Queue in SOA Suite 11g

A distributed queue is a set of physical queue across cluster.When you use distirbuted queue the message can be send to any one of the queue.It is used because it provides load balancing and failover,Hence it is reuired to have a cluster set up so that if queue in node has some issue the message can be redirected to other queue in other node.

You can review following documents initially to get some idea on Uniform distributed queue

http://download.oracle.com/docs/cd/E13222_01/wls/docs90/jms/dds.html

http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e13952/taskhelp/jms_modules/distributed_queues/CreateUniformDistributedQueues.html

Now we will start will our configuration and see how does it work actually.

I am using a SOA Suite cluster which is spread across two physical machine.

soa_server1 and soa_server2

Have configured two migratable server also for the same.

We will now see how we can do the configuration.


Steps are as follow

1>Log in to admin console

Go to messaging and create a JMS server

Point it to a file store.

Use a local location for the persistent store.

In the target server use soa_server(migratable)



Similarly create a second file store and point it to the same file store location in your local machine.

We will now target it to soa_server2(migratable)



So now your configuration should contain two jms server as shown below



Create a JMS module and target it to the soa cluster as shown



Create a new sub deployment and target it to the JMS server that we have created earlier



create a connection factory and target it to cluster.
Add the subdeployment that we have create earlier to the connection factory.



Now create a sub deployment and also attach the subdeployment to it.



So now your configuration should look something like this.



This is the only configuration we need to do from console,

Now we are good to go ahead with testing of this process.

We will use the QueueSend.java programme that is provided with default installation

We will just change the connection factories and queue values.

Will do the setEnv.cmd and will run this java programmer to insert the data in the queue.

Since distributed queue is distributed across server.

Try to insert data in one of the server and you will find the messages gets distributed evenly

on all the servers in the cluster.

there is one more configuration which needs to be checked,The Server Affinity Enabled parameter should be un-checked in Connection factory –> Configuration –> Load Balance

No comments: