activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Reese (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-3404) Purge command does not accept message selectors
Date Mon, 18 Jul 2011 17:12:57 GMT
Purge command does not accept message selectors
-----------------------------------------------

                 Key: AMQ-3404
                 URL: https://issues.apache.org/jira/browse/AMQ-3404
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.5.0
            Reporter: Allen Reese
            Priority: Minor


The admin purge command does not work with a message selector.
A patch is forth coming, there is some cleanup, and compliance to be vetted before I can attach
the patch.

(1) Browse with no arguments:

user@activemq-master:~/activemq$ activemq-admin browse --amqurl tcp://localhost:61616  --view
JMSTimestamp queue.FOO.BAR

Java Runtime: Sun Microsystems Inc. 1.6.0_22
/home/y/libexec/jdk1.6.0/jre
   Heap sizes: current=60800k  free=58531k  max=902976k
     JVM args: -Dactivemq.classpath="" 
     -Djavax.net.ssl.trustStoreType=JKS

ACTIVEMQ_HOME: /home/y/libexec/activemq
ACTIVEMQ_BASE: /home/y/libexec/activemq

JMS_HEADER_FIELD:JMSTimestamp = 1310608108263

JMS_HEADER_FIELD:JMSTimestamp = 1310608108740

JMS_HEADER_FIELD:JMSTimestamp = 1310608109283

JMS_HEADER_FIELD:JMSTimestamp = 1310608109790

JMS_HEADER_FIELD:JMSTimestamp = 1310608110324

JMS_HEADER_FIELD:JMSTimestamp = 1310608110831

JMS_HEADER_FIELD:JMSTimestamp = 1310608111374

JMS_HEADER_FIELD:JMSTimestamp = 1310608111872

JMS_HEADER_FIELD:JMSTimestamp = 1310608112415

JMS_HEADER_FIELD:JMSTimestamp = 1310608113005



(2) Browse with msgsel

user@activemq-master:~/activemq$ activemq-admin browse --amqurl tcp://localhost:61616  --view
JMSTimestamp --msgsel 'JMSTimestamp<1310608110324' queue.FOO.BAR

Java Runtime: Sun Microsystems Inc. 1.6.0_22
/home/y/libexec/jdk1.6.0/jre
   Heap sizes: current=60800k  free=58535k  max=902976k
     JVM args: -Dactivemq.classpath=""
     -Djavax.net.ssl.trustStoreType=JKS

ACTIVEMQ_HOME: /home/y/libexec/activemq
ACTIVEMQ_BASE: /home/y/libexec/activemq

JMS_HEADER_FIELD:JMSTimestamp = 1310608108263

JMS_HEADER_FIELD:JMSTimestamp = 1310608108740

JMS_HEADER_FIELD:JMSTimestamp = 1310608109283

JMS_HEADER_FIELD:JMSTimestamp = 1310608109790

(3) Purge with msgsel: - Not Working -  (what I wanted here was to use only those
matching my criteria)

user@activemq-master:~/activemq$ activemq-admin purge --msgsel 'JMSTimestamp<1310608110324'
queue.FOO.BAR

Java Runtime: Sun Microsystems Inc. 1.6.0_22
/home/y/libexec/jdk1.6.0/jre
   Heap sizes: current=60800k  free=58531k  max=902976k
     JVM args: -Dactivemq.classpath="" 
     -Djavax.net.ssl.trustStoreType=JKS

ACTIVEMQ_HOME: /home/y/libexec/activemq
ACTIVEMQ_BASE: /home/y/libexec/activemq

Connecting to JMX URL:
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:1
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:2
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:3
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:4
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:5
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:6
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:7
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:8
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:9
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:32:1:1:10
from queue: queue.FOO.BAR


(4) Purge with msgsel working with a patch:

user@activemq-master:~/activemq$ activemq-admin browse --amqurl tcp://localhost:61616  --view
JMSTimestamp --msgsel 'JMSTimestamp<1310608391914' queue.FOO.BAR

Java Runtime: Sun Microsystems Inc. 1.6.0_22
/home/y/libexec/jdk1.6.0/jre
   Heap sizes: current=60800k  free=58535k  max=902976k
     JVM args: -Dactivemq.classpath="" 
     -Djavax.net.ssl.trustStoreType=JKS

ACTIVEMQ_HOME: /home/y/libexec/activemq
ACTIVEMQ_BASE: /home/y/libexec/activemq

JMS_HEADER_FIELD:JMSTimestamp = 1310608389116

JMS_HEADER_FIELD:JMSTimestamp = 1310608389607

JMS_HEADER_FIELD:JMSTimestamp = 1310608390266

JMS_HEADER_FIELD:JMSTimestamp = 1310608390781

JMS_HEADER_FIELD:JMSTimestamp = 1310608391390



user@activemq-master:~/activemq$ ./activemq-admin purge  --msgsel 'JMSTimestamp<1310608391914'
 queue.FOO.BAR 

Java Runtime: Sun Microsystems Inc. 1.6.0_22
/home/y/libexec/jdk1.6.0/jre
   Heap sizes: current=60800k  free=58575k  max=902976k
     JVM args: -Dactivemq.classpath="" 

     -Djavax.net.ssl.trustStoreType=JKS

ACTIVEMQ_HOME: /home/y/libexec/activemq
ACTIVEMQ_BASE: /home/y/libexec/activemq

Connecting to JMX URL:
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO: Addobjects is :[JMSTimestamp<1310608391914]
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:33:1:1:1
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:33:1:1:2
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:33:1:1:3
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:33:1:1:4
from queue: queue.FOO.BAR
INFO: Removing message:
ID:activemq-master-55970-1309958858075-2:33:1:1:5
from queue: queue.FOO.BAR



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message