Author |
Message
|
yalmasri |
Posted: Tue Nov 05, 2013 12:44 am Post subject: Can a Pure JMS Client Access QM Cluster? |
|
|
Centurion
Joined: 18 Jun 2008 Posts: 110
|
I've been looking for a way to access our cluster from the outside by a pure client, and I only could find something that does this through a queue manager:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzah.doc%2Fqc10850_.htm
The two described techniques are relying on the existence of a queue manager on the client side, and a transmission queue and a client channel are to be created as requirements of using these techniques.
Now can my pure JMS client do the same while still enjoying the workload capabilities of the cluster? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Nov 05, 2013 4:05 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Nothing can connect to an MQ Cluster. MQ Clients (including ones written in JMS) can only connect to a queue manager. That queue manager may or may not be a member of the cluster of queue managers you need to get your message to.
If the queue manager you are connected to is a member of the MQ cluster it will be possible for your messages to load balance across the clustered queues in this cluster. You can only get messages from the queue manager you are connected to.
If the queue manager you are connected to is not a member of the MQ cluster, but has traditional point to point channels to a queue manager that IS in that cluster, your messages will travel from your local queue manager to the gateway queue amanger, where its possible for them to be load balanced across the clustered queues in that cluster. You can only get messages from the queue manager you are connected to.
You may find this article helpful:
http://www.ibm.com/developerworks/websphere/library/techarticles/1303_broadhurst/1303_broadhurst.html
http://www.ibm.com/developerworks/websphere/library/techarticles/1308_broadhurst/1308_broadhurst.html _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Nov 05, 2013 6:19 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Also, there's no such thing as a "pure JMS client".
JMS is a standard for APIs, not a transport standard.
Every JMS connection requires a set of provider-specific JAR files that handle the provider-specific transport.
So you can't use WebLogic JMS jar files to talk to MQ, and you can't use MQ jar files to talk to MessageSight and you can't use MessageSight JAR files to talk to EMS.
If you're used to using JMS with other messaging providers, just accept that MQ works differently. |
|
Back to top |
|
 |
yalmasri |
Posted: Wed Nov 06, 2013 3:47 am Post subject: |
|
|
Centurion
Joined: 18 Jun 2008 Posts: 110
|
mqjeff wrote: |
Also, there's no such thing as a "pure JMS client".
JMS is a standard for APIs, not a transport standard.
Every JMS connection requires a set of provider-specific JAR files that handle the provider-specific transport.
So you can't use WebLogic JMS jar files to talk to MQ, and you can't use MQ jar files to talk to MessageSight and you can't use MessageSight JAR files to talk to EMS.
If you're used to using JMS with other messaging providers, just accept that MQ works differently. |
Thanks mqjeff. I didn't hear anyone in the world having this idea about JMS, so I'm not sure why you want to make me the first
OK, the context was clear, I know how to access a cluster without joining it once I have a queue manager installed locally, and I asked on a way to access it (in cluster-aware fashion) without having queue manager installed (but of course I'm going to use IBM libraries ) |
|
Back to top |
|
 |
yalmasri |
Posted: Wed Nov 06, 2013 3:55 am Post subject: |
|
|
Centurion
Joined: 18 Jun 2008 Posts: 110
|
PeterPotkay wrote: |
If the queue manager you are connected to is a member of the MQ cluster it will be possible for your messages to load balance across the clustered queues in this cluster. You can only get messages from the queue manager you are connected to.
|
You said it will be possible? What I know is that if you remotely connect to a particular QM (specifying the different MQEnvironment fields for example with connection type client), then trying to place any message there will only go to that particular QM. What else I can do to have this message load balanced? |
|
Back to top |
|
 |
calanais |
Posted: Wed Nov 06, 2013 4:27 am Post subject: |
|
|
Apprentice
Joined: 12 Mar 2010 Posts: 32
|
Minor point but it's important... com.ibm.mq.MQEnvironment is a WMQ Base Java classes API class... It's not part of the WMQ JMS Client implementation.
M. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Nov 06, 2013 5:30 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
yalmasri wrote: |
PeterPotkay wrote: |
If the queue manager you are connected to is a member of the MQ cluster it will be possible for your messages to load balance across the clustered queues in this cluster. You can only get messages from the queue manager you are connected to.
|
You said it will be possible? What I know is that if you remotely connect to a particular QM (specifying the different MQEnvironment fields for example with connection type client), then trying to place any message there will only go to that particular QM. What else I can do to have this message load balanced? |
What you say was true up until MQ 6.0. MQ 7.0 introduced the CLWLUSEQ attribute. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
yalmasri |
Posted: Wed Nov 06, 2013 5:38 am Post subject: |
|
|
Centurion
Joined: 18 Jun 2008 Posts: 110
|
calanais wrote: |
Minor point but it's important... com.ibm.mq.MQEnvironment is a WMQ Base Java classes API class... It's not part of the WMQ JMS Client implementation.
M. |
I think this is true starting MQ7 |
|
Back to top |
|
 |
yalmasri |
Posted: Wed Nov 06, 2013 5:49 am Post subject: |
|
|
Centurion
Joined: 18 Jun 2008 Posts: 110
|
PeterPotkay wrote: |
What you say was true up until MQ 6.0. MQ 7.0 introduced the CLWLUSEQ attribute. |
Isn't this relevant only when you have a local QM? My case is different; I'm connecting remotely, and I don't have a QM and hence I don't have a channel |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 06, 2013 6:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yalmasri wrote: |
Isn't this relevant only when you have a local QM? |
In WMQ terms, the "local" QM in the one you're connected to even if you're connected via a client & the queue manager in question happens to be hosted 4,000 miles away.
yalmasri wrote: |
My case is different; I'm connecting remotely, and I don't have a QM and hence I don't have a channel |
Explain to me (given my legendary lack of Java knowledge) how you're connecting remotely to a QM without using a channel. At least a SVRCONN channel on the QM side. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
yalmasri |
Posted: Wed Nov 06, 2013 6:16 am Post subject: |
|
|
Centurion
Joined: 18 Jun 2008 Posts: 110
|
Vitor wrote: |
In WMQ terms, the "local" QM in the one you're connected to even if you're connected via a client & the queue manager in question happens to be hosted 4,000 miles away.
|
Correct me if I'm wrong, even if I have a local queue manager, and I connect to a clustered queue there using client type (not bindings), then this is the only queue that will receive my messages, not any other queue with the same name in the cluster. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 06, 2013 6:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yalmasri wrote: |
Vitor wrote: |
In WMQ terms, the "local" QM in the one you're connected to even if you're connected via a client & the queue manager in question happens to be hosted 4,000 miles away.
|
Correct me if I'm wrong, even if I have a local queue manager, and I connect to a clustered queue there using client type (not bindings), then this is the only queue that will receive my messages, not any other queue with the same name in the cluster. |
Post WMQv7 you're wrong. As my worthy associate pointed out above:
PeterPotkay wrote: |
MQ 7.0 introduced the CLWLUSEQ attribute. |
This applies to a binding or client connection. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
yalmasri |
Posted: Wed Nov 06, 2013 6:54 am Post subject: |
|
|
Centurion
Joined: 18 Jun 2008 Posts: 110
|
Vitor wrote: |
This applies to a binding or client connection. |
I can easily put together a sample and test it, I have an MQ7 cluster under my control, but where it's mentioned that this applies to both bindings and client? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 06, 2013 7:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
yalmasri wrote: |
Vitor wrote: |
This applies to a binding or client connection. |
I can easily put together a sample and test it, I have an MQ7 cluster under my control, but where it's mentioned that this applies to both bindings and client? |
Because if you had looked it up you would have realized that this attribute affects either the particular clustered queue or can be set at qmgr level.
It has nothing to do with the connection parameters... Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Nov 06, 2013 7:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
yalmasri wrote: |
Thanks mqjeff. I didn't hear anyone in the world having this idea about JMS, so I'm not sure why you want to make me the first
OK, the context was clear, I know how to access a cluster without joining it once I have a queue manager installed locally, and I asked on a way to access it (in cluster-aware fashion) without having queue manager installed (but of course I'm going to use IBM libraries ) |
You used the words "pure JMS client". I have no idea what that means. It's not a phrase that makes any sense.
Since it didn't make sense to me, I thought it possible that you might be confused about what it meant, so I explained why it didn't make sense to say that.
It also doesn't make sense to say "connect to an MQ Cluster". |
|
Back to top |
|
 |
|