|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Automatic answers for my input messages |
« View previous topic :: View next topic » |
Author |
Message
|
RulWrk |
Posted: Thu Jun 26, 2003 12:42 am Post subject: Automatic answers for my input messages |
|
|
Newbie
Joined: 26 Jun 2003 Posts: 4
|
Hi,
I would like to simulate a real environment of a customer in order to check if the development done in a C++ application is working fine.
To do that, I have two queues created: one for input messages (MQPUT) and other for output messages (MQGET).
I am able to MQPUT messages in the input queue and to retrieve them with the MQGET from the output queue, but the problem is that I need to insert "manually" the output messages.
I would like to create automatic output "dummy" messages from each input message. It could be a "common" message only changing some part of it (like the reference number or something like that).
I think that I could do that using, for instance, a process to be launched for each input message (trigger), but I am not sure. This process will MQPUT directly the output message in the MQGET queue.
The problem is that I don't know how to launch the program.
Could anybody help me on this ?
Many thanks,
RulWrk. |
|
Back to top |
|
 |
rwa |
Posted: Thu Jun 26, 2003 1:40 am Post subject: |
|
|
Voyager
Joined: 22 Jan 2002 Posts: 76 Location: Duesseldorf/Germany
|
You don't need the write an trigger for that.
An program that loops with MQGET calls on the input queue should do the work. Each time MQGET gets a message the program extents or changes the message as needed an puts the message to the output queue (MQPUT). |
|
Back to top |
|
 |
ashgove |
Posted: Thu Jun 26, 2003 3:18 am Post subject: Implement JMS listener |
|
|
Novice
Joined: 29 May 2003 Posts: 11
|
If u are using JMS, you can write a listener which listens to messages
coming on input queue and then write the modified message to
output queue.
BTW, I cud not get what u meant by "manually"?
HTH
-A- _________________ -A- |
|
Back to top |
|
 |
RulWrk |
Posted: Thu Jun 26, 2003 8:26 am Post subject: A better explanation ... |
|
|
Newbie
Joined: 26 Jun 2003 Posts: 4
|
Hi all, first, thanks for your help.
I will try to explain myself better.
The application that I am developing tries to recovery data from a customer database through a ID number using MQSeries queues facilities.
I mean, my application has two different calls to MQSeries.
- First, it builds a message and MQPUT it in the MQSeries input queue.
- Second, it waits for the answer querying with MQGET in the MQSeries output queue.
After MQSeries input queue receives a message, a trigger created by the customer (I suppose) launch a process in order to retrieve all the information using the data of the message into the customer database. Then, an output message is written in the output queue.
So, I have the application that put the input message and retrieves the answer, but I need to simulate the process made by the customer to use the message put in the input queue and create a new one in the output queue. How can I simulate that ? Maybe through a trigger that writes the output message ? If so, how can I do that ?
Many thanks for your help.
RulWrk. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 26, 2003 8:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You basically just need to write another program that will read the input queue, and generates a fake message on the output queue.
You can then cause this program to be initiated in a number of different ways.- As you say, you can configure the Input queue with a trigger that specifies your new program. Then you will start a trigger monitor that will watch the intiation queue you defined on your Input queue, which will start your program
- You can write your new program to "listen" to the input queue, by issuing an MQGet with a wait time, and looping. For instance, issue an MQGet with a wait time of 30 seconds, and loop over that MQGet until some condition is true.
- You can manually start your program.
- You can use some sort of a scheduler to start your program every couple minutes or so.
|
|
Back to top |
|
 |
bower5932 |
Posted: Fri Jun 27, 2003 9:09 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Take a look at the samples that ship with the MQ code. Specifically, look at amqsreq0.c which acts as a requester. You can then use amqsecha.c to echo back a reply. I would guess that you want a modified version of amqsecha.c. |
|
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
|
|
|
|