[Netarchivesuite-users] Purging messages from the JMSbrokerqueue

Bjarne Andersen bja at statsbiblioteket.dk
Thu Apr 23 15:57:48 CEST 2009

I think you need the command twice - once for Queues and once for Topics (two different types of JMS-queues) - hence the difference ("-t q for queues" and "-t t" for Topics)

Bjarne Andersen
Fra: netarchivesuite-users-bounces at lists.gforge.statsbiblioteket.dk [netarchivesuite-users-bounces at lists.gforge.statsbiblioteket.dk] På vegne af nicolas.giraud at bnf.fr [nicolas.giraud at bnf.fr]
Sendt: 23. april 2009 15:07
Til: netarchivesuite-users at lists.gforge.statsbiblioteket.dk
Emne: Re: [Netarchivesuite-users] Purging messages from the JMSbrokerqueue

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 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:

# 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?


Avant d'imprimer, pensez à l'environnement.
Consider the environment before printing this mail.

More information about the NetarchiveSuite-users mailing list