|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Trouble with Remote Queue Concept and JMS |
« View previous topic :: View next topic » |
Author |
Message
|
dant |
Posted: Fri Apr 01, 2005 1:35 pm Post subject: Trouble with Remote Queue Concept and JMS |
|
|
Newbie
Joined: 01 Apr 2005 Posts: 5
|
Hello all,
I am confused about the JMS abstraction of the MQ objects. From what I can tell, one creates one QCF (QueueConnectionFactory) for each QueueManager one has. Well, assuming this is true, and say I have a QueueManager with 2 local queues and one remote queue, I am not sure if you create 3 JMS Queues (Two for local, one for remote).
Essentially, I have two QueueManagers running on my local machine, one on port 1414, the other on 1415. This is being done for sandbox purposes and development. Eventually my application will have one QueueManager that is accessed via JMS, and the other QueueManager will belong to another non JMS system.
I have a script that I used to create the JMS administerd object with the JMSAdmin tool. It looks like this:
<script>
echo def qcf(xQCF) QMGR(QMX) > ivtsetup.scp
echo def q(xProductionQ) qu(X.PROD) QMGR(QMX) >> ivtsetup.scp
echo def q(xTrainingQ) qu(X.TRAIN) QMGR(QMX) >> ivtsetup.scp
echo def q(xRemoteQueue) qu(Y.PROD) QMGR(QMX) >> ivtsetup.scp
echo def qcf(yQCF) QMGR(QMY) >> ivtsetup.scp
echo def q(yQ) qu(Y.PROD) QMGR(QMY) >> ivtsetup.scp
</script>
In a program that has access to the JNDI namespace where these JMS administered objects reside, what JMS objects do I need to send a message to the remote defined queue, Y.PROD?
Essentially, I would imagine I need the xQCF to get the connection, session, etc, but can you use the connections gained from xQCF to write a message to yQ?
Is this right?
[edit] Or is it just as simple as using the yQCF to write to yQ? I wasn't sure if I was supposed to create a QCF and Q for an MQ Server that won't be accessed via JMS. Perhaps just keeping references to other MQServers in the JNDI namespace is totally legit. Again I am not sure if one creates only JMS Queues that are defined as local within MQ vs. also defining JMS Queues for remote queues as well.
TIA. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 01, 2005 1:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Connecting to xQCF send a message to xRemoteQueue using JNDI.
This will post the message to the queue as defined in the JNDI setup.
Now of course I would strongly suggest that you have a default way to communicate between xqmgr and yqmgr otherwise you're in for a few surprises.
You could as well have setup a remote queue on xQCF and send a message to that remote queue.
your setup would have looked something like this
Code: |
echo "def qr(my.remote.yq) rqmname(yqmgr) rname(yq) xmitq(yqmgr)" | runmqsc XQMGR
echo " def q(yonx) qu(my.remote.yq) qmgr(xqmgr)" >> ivtsetup.scp
|
Then you would retrieve the xqcf factory and yonx queue and send to yonx queue.
Enjoy  |
|
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
|
|
|
|