Author |
Message
|
ramires |
Posted: Tue Nov 05, 2002 7:40 am Post subject: housekeeping tool to delete dynamic queues |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
Hi,
I've some applications creating dynamic permanent queues, and sometimes the application doesn't delete them.
So I've to do a manual delete (by hand).
I'm looking for a sample program to do this for me, this is, look for queue and create date, delete if it is one day older.
There are some sample with MQ, to use MQ administration interface, but in C, and I'm not very confortable with C.
Some suggestions to do this automatically delete ?
Joao |
|
Back to top |
|
 |
pgorak |
Posted: Wed Nov 06, 2002 5:17 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
Quote: |
I've some applications creating dynamic permanent queues, and sometimes the application doesn't delete them.
|
Your application could always delete the queue, provided that:
- there are no messages on the queue,
- there are no outstanding gets or puts on the queue
Piotr |
|
Back to top |
|
 |
pgorak |
Posted: Wed Nov 06, 2002 6:33 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
Quote: |
- there are no messages on the queue,
- there are no outstanding gets or puts on the queue
|
Well, these two conditions must be satisfied in order to delete the queue using MQCO_DELETE option. For MQCO_DELETE_PURGE the condition is weaker: the queue is deleted if there are no outstanding gets or puts.
Piotr |
|
Back to top |
|
 |
ramires |
Posted: Wed Nov 06, 2002 6:50 am Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
Thanks,
but that is not my problem.. I have to delete manually the queues because the application sometimes doesn't finish well and the dynamic queues are not deleted.
Sometimes at the end of ths day I've some dozens of queue to delete.
joao |
|
Back to top |
|
 |
clindsey |
Posted: Wed Nov 06, 2002 7:15 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
If you are more comfortable with java, download SupportPac MS0B. It is the pcf interface for java. It includes a sample to list the queues. You can build on it to delete the queues that meet your criteria by submitting a MQCMD_DELETE_Q command.
Charlie |
|
Back to top |
|
 |
ramires |
Posted: Wed Nov 06, 2002 4:14 pm Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
Thanks Charlie,
I downloaded the sppack ! It is what I need to manage my queues using java and the pcf interface.
Joao |
|
Back to top |
|
 |
|