Author |
Message
|
zx7R |
Posted: Tue May 08, 2007 10:46 pm Post subject: Hi..I have trigger configuration question |
|
|
Novice
Joined: 08 May 2007 Posts: 12
|
I have soem listner which is DOS EXE.. which i want start working on new message in certain queue.
Ive read about triggers but understood not much how actually step by step i define trigger.
I have MQ 6.0, one local queue and one remote + XQMIT queue.
machine recieves a messge from another machine - and it should start some DOS EXE.
thank you. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed May 09, 2007 12:17 am Post subject: Re: Hi..I have trigger configuration question |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Hi,
Have you red "Application Programming Guide" ?
There is "Chapter 14. Starting WebSphere MQ applications using triggers". _________________ Marcin |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 09, 2007 12:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
There's also been considerable discussion of various triggering issues, should you encounter problems with the instructions referenced in the previous post.
IIRC there's also a sticky in here somewhere which discusses it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zx7R |
Posted: Wed May 09, 2007 2:21 am Post subject: Yes, i've read it. DOne and it's working but.. |
|
|
Novice
Joined: 08 May 2007 Posts: 12
|
there is some strange occurance of started appliaction :
let's say i get message, the trigger is started, calling the application - and i get no error but this:
_________________________________________________________
Waiting for a trigger message
<<<< I am talking about those empty spaces after StartListner - which is the exe i'm starting>>>
StartListner "TMC 2MKAPP026.LQ.REQUEST L
StartListner
QM_mkapp026
"
C:\>cd C:\Projects\MQClalitServer\MQClalitServer\bin\Debug
C:\Projects\MQClalitServer\MQClalitServer\bin\Debug>MQClalitServer.exe
Started...
// Here i start my application
Got Request:
<ClalitCustomersRequest>
<MessageInfo>
<InstituteCode>2</InstituteCode>
<Application>41</Application>
</MessageInfo>
<Parameters>
<PatientId>99999911</PatientId>
<Decentralization>2</Decentralization>
</Parameters>
</ClalitCustomersRequest>
Open response queue ended with CompCode: 2, Reason: 2087 Info: MQRC_UNKNOWN_REMO
TE_Q_MGR
What is TMC and why it has all that empty spaces and defionitions?
Thank you. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 09, 2007 2:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
It's the header information being passed to your program as a command line prompt.
It's all laid out in the manual......  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zx7R |
Posted: Wed May 09, 2007 3:12 am Post subject: So, what you offer me to do (Except readin all over again) |
|
|
Novice
Joined: 08 May 2007 Posts: 12
|
|
Back to top |
|
 |
Vitor |
Posted: Wed May 09, 2007 3:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Took me a while to spot your question there (never look at subject lines after the first one - bad habit! )
I recommend exactly that - the manuals are an invaluable source of reference. In this instance, the trigger header is being passed to your program as part of MQ's design so there's nothing you can do about it. Except decide to use the information helpfully provided in it, or ignore it completely. Both are valid, depending on application design and requirements.
I'm certainly not going to walk through the header structure, paraphrasing the description in the manual, possibly getting it wrong and probably causing more confusion. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 09, 2007 3:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vitor wrote: |
the trigger header is being passed to your program as part of MQ's design so there's nothing you can do about it. |
Not strictly true there - you can write and use your own trigger monitor rather than the IBM supplied one. Suggested designs are (again) in the manual and I struggle to see the point of doing this, but I mention it as an option before someone else corrects me. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zx7R |
Posted: Wed May 09, 2007 3:23 am Post subject: I do know I can write also messaging system all by myself |
|
|
Novice
Joined: 08 May 2007 Posts: 12
|
But all i need is making some little POC based on mostly ready components.
how to i eliminate those white spaces? |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 09, 2007 3:38 am Post subject: Re: I do know I can write also messaging system all by mysel |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zx7R wrote: |
how to i eliminate those white spaces? |
Using the IBM supplied code, you can't. Those spaces are unsupplied fields in the header. As I said, you could rewrite the trigger monitor, but that sounds like way more trouble than you need to go to.
They don't affect the opperation of your application if it's not referencing them. _________________ Honesty is the best policy.
Insanity is the best defence.
Last edited by Vitor on Wed May 09, 2007 3:52 am; edited 1 time in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 09, 2007 3:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The TMC2 string is passed to your program so you can USE it. For example, to get the name of the triggered queue so you can go read messages from that one, rather than some random queue.
Notice that it's in quotes, too. That means your program will see the entire structure as the first command line argument.
It likely has *nothing* to do with your 2087 return code, unless you're trying to read it to get the Qmgr Name.
Your 2087 return code is pretty specific! You tried to send a message to a queue manager that was a) not the queue manager you connected to, and b) not known by the name you used to the qmgr you connected to. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 09, 2007 3:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And to help with your 2087 check out the intercommunications manual and more specifically the section about qmgr aliases...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
zx7R |
Posted: Thu May 10, 2007 12:01 am Post subject: Hi again : ) |
|
|
Novice
Joined: 08 May 2007 Posts: 12
|
l_oResponseQueue = l_oMQManager.AccessQueue(l_oRequestMessage.ReplyToQueueName,
MQC.MQOO_OUTPUT,
l_oRequestMessage.ReplyToQueueManagerName,
null, null);
Hi. I need to return my message to remote client, how do i do that ? This returns me an error : 2087.
But i do have in a passed message name of remote queue. Its name of client's queue right?
thank you. |
|
Back to top |
|
 |
zx7R |
Posted: Thu May 10, 2007 12:03 am Post subject: I ment queueManager |
|
|
Novice
Joined: 08 May 2007 Posts: 12
|
RemoteQueueManagerName Of course.
 |
|
Back to top |
|
 |
zx7R |
Posted: Sun May 13, 2007 7:50 am Post subject: ALL WORKING!!! |
|
|
Novice
Joined: 08 May 2007 Posts: 12
|
At the end i wrote "trigger like" exe.. which starts and listens to some queue. |
|
Back to top |
|
 |
|