Author |
Message
|
dashsatya |
Posted: Mon Jul 23, 2007 10:47 pm Post subject: How to take the back up of the messages in a Queue |
|
|
 Novice
Joined: 24 Mar 2006 Posts: 17 Location: INDIA
|
Hi All
As per my requirement , i will have to write one shell script which will work as below
Script will check depth of all the local Queues under a Qmanager . If any of the Queue Depth increses a specified number then the contents of the queue will be backed up to some location in the file system and a message will be echoed to the user about this.
I would able to write the script but i dont have any idea how to take the back up of the queues . Is there any ready made programe given by IBM which i can call with in my shell script ?? or any other idea how to take the back up of the contents of the Queue.
please through some light . your help will be highly appreciated .
Thanks in advance |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Jul 23, 2007 11:09 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
to get the back up of msgs
i would simply write a shell script using amqsbcg(to browse messages) and redirecting the o/p to the file where the msgs need to be backed up  _________________ Cheers |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 23, 2007 11:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Akanksha wrote: |
to get the back up of msgs
i would simply write a shell script using amqsbcg(to browse messages) and redirecting the o/p to the file where the msgs need to be backed up  |
Why only backup when the depth hits a certain value? In best practice, messages are processed from a queue as soon as possible after they arrive; if they're piling up you should start another reading application!
If you want a copy of the messages you might want to look into the mirrorq exit, or something like the q program to unload the queue, depending on your exact requirements. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 24, 2007 1:51 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This is a really bad requirement. It takes into account almost nothing about how MQ actually works, nor how it should be used.
amqsbcg won't help very much. It will make a nice "backup" of the queue, but not in a form that can be easily "restored".
There's an entire chapter in the System Administration Guide on Backup & Recovery.
Queues in general should be empty. Taking extra steps to ensure that messages on queues are "saved" in some way, so that they aren't "lost" later is halfway towards duplicating the work that MQ already does. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jul 24, 2007 8:13 am Post subject: Re: How to take the back up of the messages in a Queue |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
dashsatya wrote: |
I would able to write the script but i dont have any idea how to take the back up of the queues . Is there any ready made programe given by IBM which i can call with in my shell script ?? or any other idea how to take the back up of the contents of the Queue. |
Hi,
Please have a look at MQ Batch Toolkit (MQBT) as it was written for this type of problem.
The sections of MQBT you should read are: QList and Backup.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|