Author |
Message
|
vicks_mq |
Posted: Tue May 07, 2019 6:04 am Post subject: How to use Q MA01 Program to generate set of Test msgs |
|
|
Disciple
Joined: 03 Oct 2017 Posts: 162
|
Hi, I would like to know how to use Q program to generate 10,000 test messages and put them into the queue at an interval of 1 second.
we have received one message from the application team and we want to run some kind of stress test , so need count of 10,000 for those messages.
also, is there a way we can do Queue Splitter using Q program , like putting 12000 messages into 3 different queues. |
|
Back to top |
|
 |
Vitor |
Posted: Tue May 07, 2019 8:59 am Post subject: Re: How to use Q MA01 Program to generate set of Test msgs |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vicks_mq wrote: |
Hi, I would like to know how to use Q program to generate 10,000 test messages and put them into the queue at an interval of 1 second. |
You mean the withdrawn MA01 support pac?
<plug>You might want it's successor.</plug>
vicks_mq wrote: |
we have received one message from the application team and we want to run some kind of stress test , so need count of 10,000 for those messages. |
When you followed the instructions in the documentation for the Q program to do what you require (10k messages at 1 second intervals) what happened? What went wrong? Why did you post here?
Better information, better advice.
vicks_mq wrote: |
is there a way we can do Queue Splitter using Q program , like putting 12000 messages into 3 different queues. |
You can put 12k messages into 3 different queues by running Q 3 times.
If you mean put 4k messages into each queue from a single execution, I don't believe you can (unless the queues are in an MQ cluster obviously). You therefore have 3 options:
- see if someone knows better than me
- get the code from GitHub (where it's been put out to pasture) and amend it to your needs
- speak to <plug>MQGem</plug> and see if that has the facility, or if it can be added for you. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
exerk |
Posted: Tue May 07, 2019 10:06 am Post subject: Re: How to use Q MA01 Program to generate set of Test msgs |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Vitor wrote: |
...If you mean put 4k messages into each queue from a single execution, I don't believe you can (unless the queues are in an MQ cluster obviously)... |
Pub/Sub, unless there are 'funnies' such as unique message IDs to worry about for Request/Reply purposes... _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
vicks_mq |
Posted: Wed May 08, 2019 2:15 am Post subject: Re: How to use Q MA01 Program to generate set of Test msgs |
|
|
Disciple
Joined: 03 Oct 2017 Posts: 162
|
Vitor wrote: |
vicks_mq wrote: |
Hi, I would like to know how to use Q program to generate 10,000 test messages and put them into the queue at an interval of 1 second. |
You mean the withdrawn MA01 support pac?
<plug>You might want it's successor.</plug>
vicks_mq wrote: |
we have received one message from the application team and we want to run some kind of stress test , so need count of 10,000 for those messages. |
When you followed the instructions in the documentation for the Q program to do what you require (10k messages at 1 second intervals) what happened? What went wrong? Why did you post here?
Well, I tried taking backup of a Queue which has 133 messages using this program and dumped into the file and then I tried to output that file into another queue but it put that as a single message instead of 133 different messages. This is not the expected behaviour.
/clocal/mqm/user/mqm/q -iPAPER.QUEUE -fPAPER.QUEUE_file_050819
/clocal/mqm/user/mqm/q -oTESTABC -FPAPER.QUEUE_file_050819
Better information, better advice.
vicks_mq wrote: |
is there a way we can do Queue Splitter using Q program , like putting 12000 messages into 3 different queues. |
You can put 12k messages into 3 different queues by running Q 3 times.
If you mean put 4k messages into each queue from a single execution, I don't believe you can (unless the queues are in an MQ cluster obviously). You therefore have 3 options:
- see if someone knows better than me
- get the code from GitHub (where it's been put out to pasture) and amend it to your needs
- speak to <plug>MQGem</plug> and see if that has the facility, or if it can be added for you. |
|
|
Back to top |
|
 |
Vitor |
Posted: Wed May 08, 2019 4:45 am Post subject: Re: How to use Q MA01 Program to generate set of Test msgs |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vicks_mq wrote: |
Well, I tried taking backup of a Queue which has 133 messages using this program and dumped into the file and then I tried to output that file into another queue but it put that as a single message instead of 133 different messages. This is not the expected behaviour.
/clocal/mqm/user/mqm/q -iPAPER.QUEUE -fPAPER.QUEUE_file_050819
/clocal/mqm/user/mqm/q -oTESTABC -FPAPER.QUEUE_file_050819 |
Single message or single commit group? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed May 08, 2019 3:38 pm Post subject: Re: How to use Q MA01 Program to generate set of Test msgs |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
vicks_mq wrote: |
Well, I tried taking backup of a Queue which has 133 messages using this program and dumped into the file and then I tried to output that file into another queue but it put that as a single message instead of 133 different messages. This is not the expected behaviour.
/clocal/mqm/user/mqm/q -iPAPER.QUEUE -fPAPER.QUEUE_file_050819
/clocal/mqm/user/mqm/q -oTESTABC -FPAPER.QUEUE_file_050819 |
<Vendor_Plug>
May I suggest you try out MQ Visual Edit because what you want to do is very easy with MQ Visual Edit:
- Open the queue
- Select all messages Ctl-A or click View -> Select All
- Click Queue -> Backup Queue
- Pick your options, directory and filename then click Save
Next:
- Click Tools -> Put Server
- Select the Queue
- Change "Max number of messages to be written" to whatever value you want. Note: If your Backup file has 133 messages then it will be 133 times whatever number you input.
- Click the radio button for MQVE Backup file and click Browse button to select the Backup file
- Click the Start button
Done. It's that easy.
</Vendor_Plug>
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
hughson |
Posted: Wed May 08, 2019 11:09 pm Post subject: Re: How to use Q MA01 Program to generate set of Test msgs |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
vicks_mq wrote: |
Hi, I would like to know how to use Q program to generate 10,000 test messages and put them into the queue at an interval of 1 second. |
Q really isn't designed for storage of messages to a file. QLOAD would be a more appropriate tool for such. However, there is little need for a file for what you wish to do. Suggest to have a side queue with your test messages on it, and use Q as follows to copy them to the new queue with the timing you want. e.g:-
Code: |
q -iSAVED.MSGS -W 1000 -o TESTABC |
Here the -W indicates how many milliseconds to wait before each MQGET, thus spreading out the puts to TESTABC to one per second. If you want feedback to the screen as it runs, you can add the -s flag on the end.
vicks_mq wrote: |
Well, I tried taking backup of a Queue which has 133 messages using this program and dumped into the file and then I tried to output that file into another queue but it put that as a single message instead of 133 different messages. This is not the expected behaviour.
/clocal/mqm/user/mqm/q -iPAPER.QUEUE -fPAPER.QUEUE_file_050819
/clocal/mqm/user/mqm/q -oTESTABC -FPAPER.QUEUE_file_050819 |
Here you used the -F (captial) rather than -f (lower case). These have different meaning.
- [-f Input file] Each line is one message
- [-F Load/Unload file] Entire file for one message
vicks_mq wrote: |
is there a way we can do Queue Splitter using Q program , like putting 12000 messages into 3 different queues. |
You don't say whether you want a copy of each message to go to each queue or whether you want to round-robin. For the former, you can use Q as follows:-
Code: |
q -iSAVED.MSGS -W1000 -ai -oQ1 -oQ1 -oQ1 -s |
The -ai is optional. Use of that flag will cause individual MQPUTs to the destination queues, without, distribution lists will be used.
The round-robin behaviour does not exist in Q or QLOAD. Of course you can use MQ clustering, and just point Q or QLOAD at a single queue name and let MQ do it. If you're interested in that pattern being added to QLOAD get in touch off-board.
QLOAD has many capabilities that are useful for loading up test messages, including being able to copy the same timing pattern that they originally arrived in. QLOAD contains the MQMD information in the file as well as the message data so the PutTime can be used to create the same pattern when you re-load up the test messages. Having the MQMD also means that your test messages have the correct format, user id and so on, as well.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
vicks_mq |
Posted: Thu May 09, 2019 12:28 am Post subject: Re: How to use Q MA01 Program to generate set of Test msgs |
|
|
Disciple
Joined: 03 Oct 2017 Posts: 162
|
Hi, I would like to know how to use Q program to generate 10,000 test messages and put them into the queue at an interval of 1 second.
hughson wrote: |
Q really isn't designed for storage of messages to a file. QLOAD would be a more appropriate tool for such |
Morag, You are absolutely right..
hughson wrote: |
However, there is little need for a file for what you wish to do.
Suggest to have a side queue with your test messages on it, and use Q as follows to copy them to the new queue with the timing you want. e.g:-
Code: |
q -iSAVED.MSGS -W 1000 -o TESTABC |
Here the -W indicates how many milliseconds to wait before each MQGET, thus spreading out the puts to TESTABC to one per second. If you want feedback to the screen as it runs, you can add the -s flag on the end.
|
Thanks for this command, but I am looking for How do I generate 10,000 copies of the same message? can Qload do that or Q program ? I got both just want to know if there is a way to do it.
What about generating with different MESSAGE IDs? |
|
Back to top |
|
 |
hughson |
Posted: Thu May 09, 2019 12:37 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
I would use QLOAD, and create the message you want if it is to be the same. Remove the line in the file with the message ID so a new one is generated each time.
Look into the Required Rate processing in the new QLOAD for useful techniques to load messages to a queue at the rate you need.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
vicks_mq |
Posted: Thu May 09, 2019 5:33 pm Post subject: |
|
|
Disciple
Joined: 03 Oct 2017 Posts: 162
|
hughson wrote: |
I would use QLOAD, and create the message you want if it is to be the same. Remove the line in the file with the message ID so a new one is generated each time.
Look into the Required Rate processing in the new QLOAD for useful techniques to load messages to a queue at the rate you need.
Cheers,
Morag |
Thank you Morag, I will definitely check it out  |
|
Back to top |
|
 |
vicks_mq |
Posted: Fri May 10, 2019 4:04 am Post subject: |
|
|
Disciple
Joined: 03 Oct 2017 Posts: 162
|
hughson wrote: |
I would use QLOAD, and create the message you want if it is to be the same. Remove the line in the file with the message ID so a new one is generated each time.
Look into the Required Rate processing in the new QLOAD for useful techniques to load messages to a queue at the rate you need.
Cheers,
Morag |
Hi Morag, Qload is same program - opt/mqm/bin/dmpmqmsg , right? |
|
Back to top |
|
 |
vicks_mq |
Posted: Fri May 10, 2019 4:06 am Post subject: |
|
|
Disciple
Joined: 03 Oct 2017 Posts: 162
|
Also in the documenation, I could not find how to generate 10,000 copies of same message? |
|
Back to top |
|
 |
vicks_mq |
Posted: Fri May 10, 2019 5:46 am Post subject: |
|
|
Disciple
Joined: 03 Oct 2017 Posts: 162
|
vicks_mq wrote: |
Also in the documenation, I could not find how to generate 10,000 copies of same message? |
In the MQGems documentation, I found how to copy the messages.
qload -i SOURCE -o TARGET -R500:300
This command instructs QLOAD to continue copying messages for 5 minutes. The other key difference about this command though is that if QLOAD reaches the end of the source queue then it will just start again at the first message.
this way we can repeatedly reach the end of SOURCE Q and then start over again.
But I don't see these parameters in the /dmpmqmsg utility with our MQ 8 installation. The above program specifically mention "qload", not sure of /dmpmqmsg will cover it. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri May 10, 2019 8:28 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
vicks_mq wrote: |
Also in the documenation, I could not find how to generate 10,000 copies of same message? |
In future posts, when you refer to 'the documentation,' please post the URL for it.
IBM's Knowledge Center should be your first place to search for official MQ product doc. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
PaulClarke |
Posted: Fri May 10, 2019 8:45 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
vicks_mq wrote: |
hughson wrote: |
I would use QLOAD, and create the message you want if it is to be the same. Remove the line in the file with the message ID so a new one is generated each time.
Look into the Required Rate processing in the new QLOAD for useful techniques to load messages to a queue at the rate you need.
Cheers,
Morag |
Hi Morag, Qload is same program - opt/mqm/bin/dmpmqmsg , right? |
QLOAD and dmpmqmsg both have the same roots. They are both based on the MO03 SupportPac I wrote many years ago when I worked for IBM. When I left IBM in 2012 the current version of MO03 was subsumed into the product as dmpmqmsg. However, I have continued developing and enhancing QLOAD to cater for a number of customer requests. As a consequence QLOAD can do an awful lot more than the vanilla dmpmqmsg can. It also has the advantage that if you raise a requirement it is very likely to be added
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
|