|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JNDI/JMS with Clustered/Alias Queues |
« View previous topic :: View next topic » |
Author |
Message
|
mqsnbmp1 |
Posted: Thu Sep 20, 2007 6:32 am Post subject: JNDI/JMS with Clustered/Alias Queues |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
I have worked with JMS/JNDI for a while, and up until now we were using Queues under a specific Queue Manager. In JNDI properties file we used provider URL as hostname:port/channel, initial context factory as com.ibm.mq.jms.context.WMQInitialContextFactory, QCF as Queue Manager name, and Queue references as Queue names. It all worked fine.
However, now this queue manager (running on "our" host) was clustered with several others (on remote hosts), and the other queue managers host the destination queues (defined as clustered alias queues?). So there is no local reference under the queue manager we connect to for the corresponding object(s). Futhermore, since it is a cluster, there are physically several instances of a specific queue (one for each clustered remote queue manager). My question is what needs to be done (via JMSADmin or by MQ admin) on our "home" queue manager in order to create an administered object (of queue type) that would map to the clustered remote queues? Is it even possible with JMS?
Many thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 20, 2007 7:38 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Right, so by using the WMQInitialContextFactory - you have intimately entangled two things that should be completly decoupled. JNDI objects should be composed of logical references to physical resources, they should not be direct mirrors of physical resources.
That said, the commands you issue in JMSAdmin are the same regardless of the context you use.
When specifying JMS queue destinations in JNDI for Clustered queues, in order to ensure that messages will be PUT without using BIND_ON_OPEN, you need to create a QREMOTE that has blank queue name and qmgr name (this is a CLUSTER alias). The name of this QREMOTE then needs to be specified as the QmgrName on the Queue Destination. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mqsnbmp1 |
Posted: Thu Sep 20, 2007 9:21 am Post subject: |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
So can the Local Queue Manager be configured as cluster alias? Do I need to use a different initial context factory class and QCF reference? WOuld the DCF be the cluster alias queue manager name? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 20, 2007 9:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Again.
In my opinion, you should not be using the context provider that you are.
This is because it fundamentally confuses what are entirely separate. The definitions in JMSAdmin have ABSOLUTELY NO CONNECTION to any definitions in the Queue Manager. The Context you are using just creates JMS definitions BASED ON the queue manager definitions.
BUT, that's just my opinion.
The commands used in JMSAdmin are entirely independent of what context provider is being used.
In addition, you need to do two things:
1) create a specific MQ Definition, a QREMOTE, on the qmgr you are connecting to, as described
2) Use the name of that qremote as the qmgr name in the JMS definitions for queues you are sending to. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mqsnbmp1 |
Posted: Thu Sep 20, 2007 10:49 am Post subject: |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
I appreciate your responses. In your first reply you stated: "You need to create a QREMOTE that has blank queue name and qmgr name (this is a CLUSTER alias). The name of this QREMOTE then needs to be specified as the QmgrName on the Queue Destination."
Can you be more specific what queue manager name to use? My local queue manager is clustered with 2 remote queue managers that host aliased queues (i.e. queues exist only on remote qm's). Should the cluster name be used instead of the queue manager name in qremote definition, or is it something else that needs to be defined (as you referred to it as cluster alias)?
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 20, 2007 11:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You create a qremote. You give it a name of whatever you want.
You could, for example, call it "CLUSTER". This is a poor name, as it's only vaguely descriptive, so I wouldn't recommend it.
You could, for example, name it the same as the name of the MQ cluster. This is a better name, some.
You then need to put a copy of this QREMOTE on every qmgr that you have JMS apps connecting to.
Then in the JMS Definitions, you put this name as the QMgrName on the Queue Destinations. For only those queues that you are PUTTING data to, that you need them to be load-balanced when you PUT. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|