|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to offload messages to different files using Qload |
« View previous topic :: View next topic » |
Author |
Message
|
Mitra |
Posted: Wed Oct 08, 2014 6:11 am Post subject: How to offload messages to different files using Qload |
|
|
Voyager
Joined: 21 Mar 2011 Posts: 78
|
Hi,
I am trying to offload messages from a queue using qload. I am able to offload all messages to a file or each message to a seperate file. But I would like to specify a number so that the qload had to offload that number of messages into each file.
Eg: If a Queue had 100k messages I want to offload messages of 10k each into different files using qload with out damaging the message data.
Please help
Thanks,
Mitra |
|
Back to top |
|
 |
JosephGramig |
Posted: Wed Oct 08, 2014 7:13 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Did you try the -r option?
like -r#100
with your other options? |
|
Back to top |
|
 |
Mitra |
Posted: Wed Oct 08, 2014 7:51 am Post subject: |
|
|
Voyager
Joined: 21 Mar 2011 Posts: 78
|
JosephGramig wrote: |
Did you try the -r option?
like -r#100
with your other options? |
Yes, I tried but still it's offloading each message into diff file not based on the number specified in -r option
./qload_linux -m QMGR -i QUEUENAME -r#1000 -f /var/mqm/tMP/myfile%n
This is how I am using. |
|
Back to top |
|
 |
PaulClarke |
Posted: Wed Oct 08, 2014 8:09 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Hi,
I'm afraid, as far as I can remember, QLOAD doesn't have an option to write a subset to each file. You can choose either to offload all messages to a file or have each message offloaded into a separate file. This does sound like a reasonable additional feature though.
I think your best bet, with the code as it stands, is to issue QLOAD multiple times. Once for each range of messages you are interested in and specifying a different file. So, in your example you could run it 10 times. First specifying the first 10K messages, then the next 10K messages etc etc.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
Mitra |
Posted: Wed Oct 08, 2014 8:44 am Post subject: |
|
|
Voyager
Joined: 21 Mar 2011 Posts: 78
|
PaulClarke wrote: |
Hi,
I'm afraid, as far as I can remember, QLOAD doesn't have an option to write a subset to each file. You can choose either to offload all messages to a file or have each message offloaded into a separate file. This does sound like a reasonable additional feature though.
I think your best bet, with the code as it stands, is to issue QLOAD multiple times. Once for each range of messages you are interested in and specifying a different file. So, in your example you could run it 10 times. First specifying the first 10K messages, then the next 10K messages etc etc.
Cheers,
Paul. |
Hi Paul,
We even tried it it didn't work as expected for the queue that is in use.
qload -m $QM -I $Q -f $CURRENTFILE -r#10000 -t 10000
This is what we used and we ended up with many files of diffrent sizes with messages ranging from 1 to 10k.
Thanks,
Mitra |
|
Back to top |
|
 |
tczielke |
Posted: Wed Oct 08, 2014 8:55 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
If you are familiar with Linux scripting, one option would be to put all the records to one file, and the use tail (or the appropriate command) to break that file into multiple files. I know I have done that in the past, and it wasn't too hard. |
|
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
|
|
|
|