Author |
Message
|
viki |
Posted: Sun Mar 12, 2006 12:39 am Post subject: MQ to MQ communication? |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 50
|
Hi,
There are two machines: A and B. On both machines WebSphere MQ V5.3 is installed (full version-not client). There is a message on Machine A which has to be sent to the specific Queue on running Machine B. Similarly, there is a message on B which has to be sent on specific queue running on Machine A.
How it could be done? Do I have to do some configuration in both MQ's Explorer? I'm not an MQ guy.
Kindly guide me.
Thanks,
Bye,
Viki.
Block diagram of above scenario:
 |
|
Back to top |
|
 |
wschutz |
Posted: Sun Mar 12, 2006 3:42 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
You need to create MQ objects called;
(1) Remore queue definitions (qremote), this is a definition which describes what queue manager and queue to send a message to...
(2) a transmission queue (xmitq), this is a place where messages can be held until they are sent and
(3) a pair of channel definitions, this is used to define how to send messages from one queue manager to another.
This is all defined in detail in the Intercommunications guide (the "documentation" button above has a directl link to the manual).
good luck... _________________ -wayne |
|
Back to top |
|
 |
viki |
Posted: Sun Mar 12, 2006 5:30 am Post subject: |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 50
|
Hi,
I'm following the Intercommunciation manual. But I'm using WebSphere MQ Explorer for MQ objects creation.
So far, I've did the following and getting this error:
Code: |
Exeption javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue Remote_Queue |
I have:
1) created a local queue with name Remote_Queue on machine A.
2) created a remote queue definition with name Remote_Queue on machine B.
3) While creating remote queue in step (3), I gave the following values:
a) Queue Name: Remote_Queue
b) Scope: Queue Manager.
c) Remote Queue Name: Remote_Queue
d) Remote Queue Manager Name: MachineA_QMGR
e) Transmission Queue Name: MachineA_QMGR
In (3-e) above, I also tried by leaving Transmission Queue Name blank. But the same error.
Apart from above, I have created a Channel: C_Channel on both machines A and B as Reciever and Sender respectively. While creating Sender Channel on machine B, I gave the following values:
i) Channel Name: C_Channel
ii) Connection Name: IP Address of Machine A.
iii) Transmission Queue: MachineA_QMGR
iv) Local Communication Address: Blank.
As said in Intercommunication manual, I have tried PINGing from C_Channel on Machine B to C_Channel on Machine A and it is successfull.
Also, when I try to connect any local queue from my JMS code, it is successfull. But it's not connecting (able to open) remote queue and giving error: MQJMS2008.
The code I'm using to open the remote queue is:
Code: |
q = session.createQueue("queue:///"+"Remote_Queue"+"?targetClient=1"); |
and other connection variables are:
Code: |
public static final String HOSTNAME = "localhost";
public static final String QMGRNAME = "MachineB_QMGR";
public static final String CHANNEL = "SYSTEM.DEF.SVRCONN";
public static final int PORT = 1414;
|
Looking for help!!
Bye,
Viki. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Mar 12, 2006 5:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You won't be able to receive messsages from the remote queue, only from the local queues. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
viki |
Posted: Sun Mar 12, 2006 5:46 am Post subject: |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 50
|
jefflowrey wrote: |
You won't be able to receive messsages from the remote queue, only from the local queues. |
But why it is not able to open? To be specific, why it is giving Exeption javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue Remote_Queue
?
Bye,
Viki |
|
Back to top |
|
 |
viki |
Posted: Sun Mar 12, 2006 8:44 am Post subject: |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 50
|
Hi,
Ok!! It's working . The mistake was that, I was not defining "transmission queue". I did this using MQ Explorer. On source machine create a Local Queue and while creating/configuring, see right on the bottom of the screen, there will be "Usage". Do this "Transmission". This means the queue you defined will work as a Transmission Queue. Now when defining Remote queue definition, select this Transmission queue in pull down value. Also, when defining SENDER channel, select this as a Transmission Queue from pull down value.
However, it is successfull, but when I gave
CHANNEL = "MYSENDERCHANNEL"; it does not work and gives the below error:
Code: |
myJMSException: com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009 |
The log AMQERR01.LOG says:
Quote: |
AMQ9502: Type of channel not suitable for action requested.
EXPLANATION:
The operation requested cannot be performed on channel 'MYSENDERCHANNEL'.
Some operations are only valid for certain channel types. For example, you can
only ping a channel from the end sending the message.
ACTION:
Check whether the channel name is specified correctly. If it is check that the
channel has been defined correctly. |
But if I use CHANNEL = "SYSTEM.DEF.SVRCONN", then it works successfully.
Why it is like that? What is the difference between CHANNEL SYSTEM.DEF.SVRCONN and MYSENDERCHANNEL?
Thanks,
Bye,
Viki. |
|
Back to top |
|
 |
zpat |
Posted: Sun Mar 12, 2006 8:54 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
A program cannot open a remote queue for input (only output).
All MQGETs are from local queues, but messages may have arrived there from a remote system. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Mar 12, 2006 9:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
viki wrote: |
Why it is like that? What is the difference between CHANNEL SYSTEM.DEF.SVRCONN and MYSENDERCHANNEL? |
Read the intercommunications manual. Channels have different types for different purposes. Client communication is enabled through the SVRCONN/CLTCONN pair. The SVRCONN is on the server.
Now read the manual  _________________ MQ & Broker admin |
|
Back to top |
|
 |
viki |
Posted: Sun Mar 12, 2006 10:14 am Post subject: |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 50
|
fjb_saper wrote: |
Now read the manual  |
Reading... WebSphere MQ Information Center Book: Clients: Chapter 8 Using Channels And Book: Intercommunication: Chapter 1 Concepts of Intercommunication  |
|
Back to top |
|
 |
|