Author |
Message
|
sevenfan |
Posted: Thu May 22, 2003 3:15 pm Post subject: Basic Setup and Configuration Question |
|
|
Apprentice
Joined: 22 May 2003 Posts: 42
|
I have a quick question about setting up MQSeries so that a client can connect and deliver a message. I have a local Queue Manager set up, and a local queue created which is configured for inbound and outbound messages. My client application is requesting the machine name, queue manager name, port, queue, and channel. What I am confused about is that when I create a channel, I get prompted for a connection. When I create a connection I am prompted for a transmission queue. Do I need all of this if everything is running locally? I am running MQSeries 5.3 on a Windows 2000 platform under MMC.
Thanks. |
|
Back to top |
|
 |
mgrabinski |
Posted: Thu May 22, 2003 11:02 pm Post subject: |
|
|
Master
Joined: 16 Oct 2001 Posts: 246 Location: Katowice, Poland
|
Hi
If by 'client' you mean an MQ client, than it doesn't matter whether it runs localy or remotely - you have to provide the information you mentioned.
But if you mean just an application that runs localy and connects to the manager, you don't need any channels - just issue MQCONN, MQOPEN and MQPUT/MQGET calls. _________________ Marcin Grabinski <>< |
|
Back to top |
|
 |
dishi |
Posted: Sun May 25, 2003 12:51 am Post subject: |
|
|
Newbie
Joined: 23 May 2003 Posts: 2
|
1. you need to define the channel as server channel not as a sender and you will not be asked for connection name and transmission queue.
2. If you use same box you dont need an cleint mode so you will work in 'binding' mode.
dishi |
|
Back to top |
|
 |
sevenfan |
Posted: Wed May 28, 2003 1:49 pm Post subject: RE:Basic Setup and Configuration Question |
|
|
Apprentice
Joined: 22 May 2003 Posts: 42
|
Here is what I set up, according to documentation I found in the Intercommunication doc, in chapter 2.
Source:
Queue Manager: QM_Source
Server Channel: ABC
Remote Queue Definition: Target_queue
Transmission Queue: QM_Target
Remote Queue Manager Name: QM_Target
Target:
Queue Manager: QM_Target
Receiver Channel: ABC
Queue Name: Target_queue
I have a little java class that I can run (thanks to help I received from this site) and everything looks like the message was successfully posted. However, viewing any of the queues for messages yields nothing.
Any ideas?
Thanks. |
|
Back to top |
|
 |
neo |
Posted: Wed May 28, 2003 7:42 pm Post subject: |
|
|
Newbie
Joined: 19 May 2003 Posts: 8
|
I think the problem is that the server channel does not start automatically.
You have to start it mannuallu otherwise u can use a sender channel instead of server channel. |
|
Back to top |
|
 |
sevenfan |
Posted: Wed May 28, 2003 9:11 pm Post subject: Wish that worked |
|
|
Apprentice
Joined: 22 May 2003 Posts: 42
|
Hmmm. I tried manually starting the server connection, but I still don't see that the message made it over. I did finally start seeing messages get to the transmission queue on the source queue manager, but it doesn't look like it's going any further.
According to the way I read the documentation in Chapter 2 of the intercommunications guide, I should just place the message onto the remote queue on the source queue manager. I just expected that the infrastructure of the connection would take care of the rest. It's gotta be something simple that I'm missing.
Thanks. |
|
Back to top |
|
 |
vennela |
Posted: Thu May 29, 2003 5:38 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
Hmmm. I tried manually starting the server connection |
Is that a server connection channel or server channel. They are both different.
The chltype of server channel is SVR and that of server connection channel is SVRCONN. If you have defined a SVRCONN channel then it will not work.
Delete the old channel ABC and define a SDR (Sender) channel with the name ABC and it should work. |
|
Back to top |
|
 |
sevenfan |
Posted: Thu May 29, 2003 7:11 am Post subject: Connection Type |
|
|
Apprentice
Joined: 22 May 2003 Posts: 42
|
The channel was defined as a server channel. If I take Vennela's advice and define a Sender (SDR) channel, then I need to set up a connection first, don't I?
Also, I have been unable to get my client application to place a message on a local queue unless I have a SVRCONN defined for it.
Ultimately what I want to do is place a message on one queue manager's queue - which would be local to the client application, and have the message be placed on a remote queue for pickup on which may be on another machine. However, for the purposes of this exercise, everything is local just running on different queue managers.
At least part of my confusion is the various connection/channel options.
Thanks. |
|
Back to top |
|
 |
vennela |
Posted: Thu May 29, 2003 7:29 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Did the SVR channel ever start. Do you have the listeners running. Did you give the right port number in the CONNAME for the SVR channel.
Quote: |
Also, I have been unable to get my client application to place a message on a local queue unless I have a SVRCONN defined for it.
|
How are you putting the message?? |
|
Back to top |
|
 |
sevenfan |
Posted: Thu May 29, 2003 7:59 am Post subject: Completely Confused |
|
|
Apprentice
Joined: 22 May 2003 Posts: 42
|
I am working with a Windows-based MQ Configuration tool that runs under Microsoft Management Console, so I don't have (nor in some cases understand) the command line stuff, so please bear with me on this. And, I appreciate your help on this.
I can right-click and start the SVR connection and it appears to work - it is accepted.
The ports were defined when I set up the queue managers. For the source queue manager I used port 1111, and for the target QM, port 1112.
I have been trying to make the process work in a couple of different ways, figuring if it works one way, it should work for both. The first is a simple java class that I am providing source for:
import com.ibm.mq.*;
public class mqput2 extends Object {
public mqput2(){
}
public static void main(String args[]){
String QMGR = args[1];
String QUEUE = args[0];
String MESSAGE = args[2];
System.out.println("MQPut Program started");
try{
MQQueueManager qmgr = new MQQueueManager(QMGR);
System.out.println("Connected to QMGR :" + QMGR);
int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING ;
MQQueue InQueue = qmgr.accessQueue(QUEUE , openOptions, null, null, nul
l);
MQMD messageDesc = new MQMD();
MQMessage inMessage = new MQMessage();
inMessage.writeString(MESSAGE);
InQueue.put(inMessage);
System.out.println("Message Id is :" + inMessage.messageId);
System.out.println("Message is: " + MESSAGE);
InQueue.close();
qmgr.disconnect();
}
catch (MQException ex){
System.out.println("MQ Error - Reason code :" + ex.reasonCode);
}
catch(Exception e){
System.out.println("Error : " + e);
}
}
}
As far as I can figure out, this is the basic "Hello MQ" type of application. My command line is as follows:
C:\Download\Java\MQSeries>java -cp ".;com.ibm.mq.jar;connector.jar" mqput2 Target_queue QM_Source "This is my message"
Target_queue is defined on the Source queue manager as a remote queue. This works, in that the message gets placed on the transmission queue that I defined on the source queue manager.
Let me know what else you might need.
Thanks again for the assistance. |
|
Back to top |
|
 |
vennela |
Posted: Thu May 29, 2003 8:25 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
After you start the channel
In Websphere MQ Explorer
Right click on the channel and click on Status
It will throw another window. See what the channel status column says for the channel.
Do it on both the QMGRS.
On QM_Source, for the SVR channel ABC, is the connection name localhost(1112) ? |
|
Back to top |
|
 |
sevenfan |
Posted: Thu May 29, 2003 9:15 am Post subject: Channel Status |
|
|
Apprentice
Joined: 22 May 2003 Posts: 42
|
Right clicking on either channel, selecting status and looking at the Channel Status shows blank. I also tried right clicking and selecting start. I get a message back indicating that the request to start the channel was accepted, but I still don't see anything in the status. |
|
Back to top |
|
 |
vennela |
Posted: Thu May 29, 2003 11:02 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
That means your channel is not starting for some reason. See what the reason is in the error logs.
The error logs are in
<MQ Install Dirctory>\QMGRS\<QMGR Name>\errors
If you haven't done anything special then they are in
C:\Program Files\IBM\WebSphere MQ\QM_source\errors\AMQERR01.LOG
Start the channel and there will be an entry in the file as to why the channel is not started. Post it if you can't figure out why.
-------
Venny |
|
Back to top |
|
 |
Ratan |
Posted: Thu May 29, 2003 12:24 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
Also check if your Command server is running. You can find this in MQ Services MMC console. You can also check for errors in windows 2000 Event viewer.
-Ratan. |
|
Back to top |
|
 |
sevenfan |
Posted: Thu May 29, 2003 3:41 pm Post subject: Basic Setup and Configuration Question |
|
|
Apprentice
Joined: 22 May 2003 Posts: 42
|
At least I thought this was going to be simple. I have made some progress since my last post.
I have a working Java class (for which I posted source earlier) that posts a message to the remote queue on the local queue manager. What I changed was the channel. I changed that from a server channel to a sender channel, and also, in the definition placed the IP address and port of the remote queue manager in the connection field, and pointed it to the transmission queue I have defined locally. This works great. I figure I can modify the Java class to do whatever I need.
However, I still cannot get my client 3rd party application to work correctly. The only way I have been successful so far is to use a server connection to a local queue. In the new configuration, where I am attempting to place data on the remote queue, and pointing to the local queue manager, my 3rd party application generates an error stating Type of channel not suitable for action requested.
I created a server channel, and changed the configuration to match, but my 3rd party application still doesn't like that - same error as above.
Thanks. |
|
Back to top |
|
 |
|