ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » MQ Cluster Workload balance

Post new topic  Reply to topic
 MQ Cluster Workload balance « View previous topic :: View next topic » 
Author Message
RadhamaniRamadoss
PostPosted: Thu Apr 11, 2013 5:15 pm    Post subject: MQ Cluster Workload balance Reply with quote

Apprentice

Joined: 08 Oct 2009
Posts: 42

I have 3 Queue managers.
MB7QMGR is a Partial repository.QM1 and QM2 are Full repositories.
To enact a scenario of Cluster Qoekload balance ,I have a Queue "CLUSTERQ" which has its intance running in all the 3 Queue managers.

I made use of the below java program to put messages in the CLUSTERQ by connecting to MB7QMGR.

When messages are sent,the messages are distributed in round-robin fashion.
Now before putting the message,I shut down the Queue manager.My expection is when the QM is not available,messages should be picked by other QMs in the cluster.But this is not working.I am getting "host not available" error and the error is captured by MQException class.

Is this properly working?Or Am I missing something?
I have MQOO_BIND_NOT_FIXED while MQopen and MQPut.I have Cluster queue property set as Default bind type="Not fixed" and Use Queue="Any".
Please someone help me solve this....

Here is my application connected to MQServer:
public class MQ_Java_put {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String server = "WELCOME-PC"; // The server name
Integer port = new Integer(2414); // The Port the listener is running on
//String user = "USER"; // User name
//String password = "PASSWORD"; // Password
String qmanager = "MB7QMGR"; // Queue Manager name
String q = "CLUSTERQ";
int options = MQC.MQOO_OUTPUT ;
try
{
MQQueueManager qMgr;

MQQueue requestQueue;
MQPutMessageOptions pmo = new MQPutMessageOptions();


Hashtable properties = new Hashtable();

// properties.put(MQC.USER_ID_PROPERTY, user);
// properties.put(MQC.PASSWORD_PROPERTY, password);

properties.put(MQC.HOST_NAME_PROPERTY, server);
properties.put(MQC.PORT_PROPERTY, port);
properties.put(MQC.CHANNEL_PROPERTY, "SYSTEM.DEF.SVRCONN");

// create the queue manager object
qMgr = new MQQueueManager(qmanager, properties);
// annd access the queue
requestQueue = qMgr.accessQueue(q, options);

// Set put options for message
// pmo.options = MQC.MQOO_BIND_NOT_FIXED;

// Make MQ generate new MessageID for each message
//pmo.options |= MQC.MQOO_BIND_NOT_FIXED;

// Now lets create the MQ Message
MQMessage requestMessage = new MQMessage();
// Populate the message with some text
requestMessage.writeUTF("Test message");
// and write to the queue
requestQueue.put(requestMessage, pmo);

byte[] msgID = requestMessage.messageId;
// Now close down
requestQueue.close();
qMgr.close();

}
catch (MQException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 11, 2013 7:00 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

your understanding is wrong. You seem to be confusing both MQ Clustering and HA clustering.

Why would you expect to be able to put a message anywhere if the queue manager you are trying to connect to is not available?
This would be HA behavior.

MQ Clustering is only for load balancing... not for High Availability

Working as designed.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
RadhamaniRamadoss
PostPosted: Thu Apr 11, 2013 9:23 pm    Post subject: Reply with quote

Apprentice

Joined: 08 Oct 2009
Posts: 42

Thank you ..... I got it now !!!! The difference is wonderfully explained...Thanks a lot !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MQ Cluster Workload balance
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.