[Netarchivesuite-users] Purging messages from the JMSbrokerqueue
nicolas.giraud at bnf.fr
nicolas.giraud at bnf.fr
Thu Apr 23 15:07:39 CEST 2009
Hi Soren,
Thanks for your answer. I did this but still I think the script in the
documentation contains errors. Here it is quoted straight from the
documentation :
export JMS_ENV=PROD
export MQ_HOME=/usr/local
# imqcmd using -u admin -passfile ~/.imq_passfile
$MQ_HOME/bin/imqcmd list dst -t q -u admin -passfile ~/.imq_passfile |
grep ^${JMS_ENV}_ | cut -f1 -d\ |xargs -r -n 1 $MQ_HOME/bin/imqcmd destroy
dst -t q -u admin -passfile ~/.imq_passfile -f -n
$MQ_HOME/bin/imqcmd list dst -t t -u admin -passfile ~/.imq_passfile |
grep ^${JMS_ENV}_ | cut -f1 -d\ |xargs -r -n 1 $MQ_HOME/bin/imqcmd destroy
dst -t t -u admin -passfile
~/.imq_passfile -f -n"
The last double quote is a syntax error, and basically commands are
repeated twice ... Also the -n parameter on the destroy command should
have a value.
Here's my script attempt:
JMS_ENV=bnf_test
IMQCMD=/bnf/netarchivesuite/openmq-4.3/mq/bin/imqcmd
PASSFILE=./admin.passfile
# imqcmd using -u admin -passfile $PASSFILE
echo -e "Listing queues"
$IMQCMD list dst -t q -u admin -passfile $PASSFILE | grep ^${JMS_ENV}_ |
cut -f1 -d\ | xargs -r -n 1 $IMQCMD destroy dst -t q -u admin -passfile
$PASSFILE -f -n
Which seems to produce the desired effect.
Can you please confirm?
Best,
Nicolas
Avant d'imprimer, pensez à l'environnement.
Consider the environment before printing this mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ml.sbforge.org/pipermail/netarchivesuite-users/attachments/20090423/fc58fd95/attachment-0002.html>
More information about the NetarchiveSuite-users
mailing list