Author |
Message
|
belchman |
Posted: Thu Mar 01, 2007 9:47 am Post subject: Source for AMQSPUTC binary |
|
|
Partisan
Joined: 31 Mar 2006 Posts: 386 Location: Ohio, USA
|
I am trying to write a C process that does a put to a remote qmgr from a MQ Client for AIX host over a srvconn.
It appears that amqsput0.c is not the source for the amqsputc binary.
Does anyone know where the souce for amqsputc is?
If amqsput0.c is the source for amqsputc, can someone explain what I am doing wrong?
Here is the test I used to verfiy that amqsput0.c is not source for amqsputc.
I localized a copy of amqsput0.c
I compiled above as follows >>gcc -o hdbputc amqsput0.c -lmqm
I exported MQSERVER env var
When I run delivered amqsputc as >> amqsputc TEST, it puts to proper qmgr
When I run newly created hdbputc as >> hdbputc TEST, it writes to local queue manager
The problem I am trying to address...
I have to right a light-weight agent to sit on a MQ Client for AIX node that puts messages over a Svrconn that a misbehaving vendor app is putting over. That way, when the app gets a MQRC 2009 over SvrconnA but my agent does not get a MQRC 2009 over SvrconnA, I have a defense against the vendor saying the problem is with the qmgr.
Any thoughts are welcome!!!!! |
|
Back to top |
|
 |
Toronto_MQ |
Posted: Thu Mar 01, 2007 9:56 am Post subject: |
|
|
 Master
Joined: 10 Jul 2002 Posts: 263 Location: read my name
|
Since amqsputc is the client version of amqsput0.c, you need to link it with the client library - and not the server library, which you have done.
Cheers
Steve |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 01, 2007 9:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
did you build amqsput0.c as client app?
No, the actual source for the actual amqsputc is not available. amqsput0.c is the sample source - amqsputc is smarter than the sample. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
belchman |
Posted: Thu Mar 01, 2007 10:03 am Post subject: |
|
|
Partisan
Joined: 31 Mar 2006 Posts: 386 Location: Ohio, USA
|
I used the amqcput0.c that is installed with MQ Server on a server host and compiled on the MQ server host.
Will it...
work if I get the amqsput0.c from the MQ client host and compile it on the MQ server host?
work if I compile the customized amqsput0.c source from the MQ client host on the MQ client host |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 01, 2007 10:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It will
work if you compile it against the client libraries
wherever those are. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
belchman |
Posted: Fri Mar 02, 2007 8:15 am Post subject: |
|
|
Partisan
Joined: 31 Mar 2006 Posts: 386 Location: Ohio, USA
|
OK,
This is related to this original post but another set of questions.
I am still working on defending the honor of MQ here. While I work on getting the agent created (normal delays), me and the application developer worked to implement a test in which we NOHUP started an instance of AMQSPUTC on the MQ client node. Here are some specific data:
1) We started a long running AMQSPUTC connected over application's specific SvrConn (SvrConnA) to an exact copy of application's queue (QueueA) on QmgrA. We left it running connected at the "input msg prompt"
2) I verified that conn and handle to QMgrA.QueueA existed on QMgrA as "Process(495890.17138) User(mqm) Program(amqrmppa)".
3) Application Host has MQ Client for AIX v 5.3.7 (maybe higher but can't get there to verify right now) installed
4) QmgrA is MQ for AIX v6.0.1.1
5) QMgrA has TCP KeepAlive=yes
6) SvrConnA has hbint=300, keepalive=auto
This morning when I came in, the queue handle was gone. I did verify that the amqrmppa with PID=495890 was still running, but had no thread of 17138.
Question(s):
1) If nothing was going wrong, would that AMQSPUTC process have kept that connection and input handle indefinitely?
2) Would the QMgr have killed the thread for any reason? (ignore network/OS/Firewall for the moment)
I am going to be working with AIX guys and network guys later. I just want to have support when I say, "This is not an MQ problem".
Thanks |
|
Back to top |
|
 |
tleichen |
Posted: Fri Mar 02, 2007 9:45 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
Not having your code, I can't be sure. But, I assume you're not doing anything like an MQCLOSE and/or MQDISC in your code? And if not, how do you cleanly end the task? (Please don't say you just kill the PID.... yuk!)
Barring that, I would make sure that there was not a network glitch. What happens when you send data into it at this point? What error(s) are reported? _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
mvic |
Posted: Fri Mar 02, 2007 2:33 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
jefflowrey wrote: |
No, the actual source for the actual amqsputc is not available. amqsput0.c is the sample source - amqsputc is smarter than the sample. |
amqsput and amqsputc are indeed built from amqsput0.c ... where did your information come from, Jeff? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Mar 05, 2007 7:10 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
mvic wrote: |
jefflowrey wrote: |
No, the actual source for the actual amqsputc is not available. amqsput0.c is the sample source - amqsputc is smarter than the sample. |
amqsput and amqsputc are indeed built from amqsput0.c ... where did your information come from, Jeff? |
Apparently nowhere.
Is it amqsbcg that isn't built from the sample code? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mvic |
Posted: Tue Mar 06, 2007 12:44 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
jefflowrey wrote: |
Is it amqsbcg that isn't built from the sample code? |
No, I think that's from the supplied source too. Could you be thinking of runmqtrm? |
|
Back to top |
|
 |
HubertKleinmanns |
Posted: Tue Mar 06, 2007 1:50 am Post subject: |
|
|
 Shaman
Joined: 24 Feb 2004 Posts: 732 Location: Germany
|
mvic wrote: |
jefflowrey wrote: |
Is it amqsbcg that isn't built from the sample code? |
No, I think that's from the supplied source too. Could you be thinking of runmqtrm? |
The samples include a trigger monitor called amqstrg0.c which acts as a trigger monitor, but includes only a subset of the functionality of runmqtrm. _________________ Regards
Hubert
Last edited by HubertKleinmanns on Tue Mar 06, 2007 4:03 am; edited 1 time in total |
|
Back to top |
|
 |
Nigelg |
Posted: Tue Mar 06, 2007 3:23 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
I think amqstrg0.c has the same functionality as runqmtrm but does not have any of the WMQ tracing. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
belchman |
Posted: Wed Apr 04, 2007 6:06 am Post subject: |
|
|
Partisan
Joined: 31 Mar 2006 Posts: 386 Location: Ohio, USA
|
I got this to work by:
1) Deploy .c source to MQ Client host
2) compiling with following command line args
So now the c object works as amqsputc but message input command line is not presented. It puts the message passed as argument.
gcc -o executableName executableName.c -I/usr/mqm/inc -L/usr/mqm/lib -limqb23ia -lmqic
I was using this set of compiler options before this original post...
gcc -o executableName executableName.c -lmqm |
|
Back to top |
|
 |
|