Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2080

ActiveMQ browse and purge commands with message selector (--msgsel) with string property does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JBoss A-MQ 6.3.x
    • JBoss A-MQ 6.2, JBoss A-MQ 6.3
    • jms-client
    • None
    • Hide
      • start broker
      • create test queue named TestQueue and send 3 messages using admin console
      • execute following commands on karaf console. purge command does not work as expected
      JBossFuse:karaf@root> activemq:browse --user admin --password admin --amqurl tcp://localhost:61616 TestQueue
      JMS_BODY_FIELD:JMSText = test1
      JMS_HEADER_FIELD:JMSExpiration = 0
      JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-3:1:1:1:1
      JMS_HEADER_FIELD:JMSPriority = 0
      JMS_HEADER_FIELD:JMSDestination = TestQueue
      JMS_HEADER_FIELD:JMSTimestamp = 1490170344978
      JMS_HEADER_FIELD:JMSRedelivered = false
      JMS_HEADER_FIELD:JMSDeliveryMode = persistent
      
      JMS_BODY_FIELD:JMSText = test2
      JMS_HEADER_FIELD:JMSExpiration = 0
      JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-5:1:1:1:1
      JMS_HEADER_FIELD:JMSPriority = 0
      JMS_HEADER_FIELD:JMSDestination = TestQueue
      JMS_HEADER_FIELD:JMSTimestamp = 1490170351335
      JMS_HEADER_FIELD:JMSRedelivered = false
      JMS_HEADER_FIELD:JMSDeliveryMode = persistent
      
      JMS_BODY_FIELD:JMSText = test3
      JMS_HEADER_FIELD:JMSExpiration = 0
      JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-7:1:1:1:1
      JMS_HEADER_FIELD:JMSPriority = 0
      JMS_HEADER_FIELD:JMSDestination = TestQueue
      JMS_HEADER_FIELD:JMSTimestamp = 1490170356173
      JMS_HEADER_FIELD:JMSRedelivered = false
      JMS_HEADER_FIELD:JMSDeliveryMode = persistent
      
      JBossFuse:karaf@root> activemq:purge --jmxuser admin --jmxpassword admin --jmxlocal --msgsel "JMSMessageID='*:1'" TestQueue
      INFO: Removed: 0 messages for message selector JMSMessageID='*:1'
      

      Without using the wildcard, purge command does work.

      JBossFuse:karaf@root> activemq:purge --jmxuser admin --jmxpassword admin --jmxlocal --msgsel "JMSMessageID='ID:unused-220-201.nrt.redhat.com-37123-1490170298745-7:1:1:1:1'" TestQueue
      INFO: Removed: 1 messages for message selector JMSMessageID='ID:unused-220-201.nrt.redhat.com-37123-1490170298745-7:1:1:1:1'
      JBossFuse:karaf@root> activemq:browse --user admin --password admin --amqurl tcp://localhost:61616 TestQueue
      JMS_BODY_FIELD:JMSText = test1
      JMS_HEADER_FIELD:JMSExpiration = 0
      JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-3:1:1:1:1
      JMS_HEADER_FIELD:JMSPriority = 0
      JMS_HEADER_FIELD:JMSDestination = TestQueue
      JMS_HEADER_FIELD:JMSTimestamp = 1490170344978
      JMS_HEADER_FIELD:JMSRedelivered = false
      JMS_HEADER_FIELD:JMSDeliveryMode = persistent
      
      JMS_BODY_FIELD:JMSText = test2
      JMS_HEADER_FIELD:JMSExpiration = 0
      JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-5:1:1:1:1
      JMS_HEADER_FIELD:JMSPriority = 0
      JMS_HEADER_FIELD:JMSDestination = TestQueue
      JMS_HEADER_FIELD:JMSTimestamp = 1490170351335
      JMS_HEADER_FIELD:JMSRedelivered = false
      JMS_HEADER_FIELD:JMSDeliveryMode = persistent
      
      Show
      start broker create test queue named TestQueue and send 3 messages using admin console execute following commands on karaf console. purge command does not work as expected JBossFuse:karaf@root> activemq:browse --user admin --password admin --amqurl tcp://localhost:61616 TestQueue JMS_BODY_FIELD:JMSText = test1 JMS_HEADER_FIELD:JMSExpiration = 0 JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-3:1:1:1:1 JMS_HEADER_FIELD:JMSPriority = 0 JMS_HEADER_FIELD:JMSDestination = TestQueue JMS_HEADER_FIELD:JMSTimestamp = 1490170344978 JMS_HEADER_FIELD:JMSRedelivered = false JMS_HEADER_FIELD:JMSDeliveryMode = persistent JMS_BODY_FIELD:JMSText = test2 JMS_HEADER_FIELD:JMSExpiration = 0 JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-5:1:1:1:1 JMS_HEADER_FIELD:JMSPriority = 0 JMS_HEADER_FIELD:JMSDestination = TestQueue JMS_HEADER_FIELD:JMSTimestamp = 1490170351335 JMS_HEADER_FIELD:JMSRedelivered = false JMS_HEADER_FIELD:JMSDeliveryMode = persistent JMS_BODY_FIELD:JMSText = test3 JMS_HEADER_FIELD:JMSExpiration = 0 JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-7:1:1:1:1 JMS_HEADER_FIELD:JMSPriority = 0 JMS_HEADER_FIELD:JMSDestination = TestQueue JMS_HEADER_FIELD:JMSTimestamp = 1490170356173 JMS_HEADER_FIELD:JMSRedelivered = false JMS_HEADER_FIELD:JMSDeliveryMode = persistent JBossFuse:karaf@root> activemq:purge --jmxuser admin --jmxpassword admin --jmxlocal --msgsel "JMSMessageID='*:1'" TestQueue INFO: Removed: 0 messages for message selector JMSMessageID='*:1' Without using the wildcard, purge command does work. JBossFuse:karaf@root> activemq:purge --jmxuser admin --jmxpassword admin --jmxlocal --msgsel "JMSMessageID='ID:unused-220-201.nrt.redhat.com-37123-1490170298745-7:1:1:1:1'" TestQueue INFO: Removed: 1 messages for message selector JMSMessageID='ID:unused-220-201.nrt.redhat.com-37123-1490170298745-7:1:1:1:1' JBossFuse:karaf@root> activemq:browse --user admin --password admin --amqurl tcp://localhost:61616 TestQueue JMS_BODY_FIELD:JMSText = test1 JMS_HEADER_FIELD:JMSExpiration = 0 JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-3:1:1:1:1 JMS_HEADER_FIELD:JMSPriority = 0 JMS_HEADER_FIELD:JMSDestination = TestQueue JMS_HEADER_FIELD:JMSTimestamp = 1490170344978 JMS_HEADER_FIELD:JMSRedelivered = false JMS_HEADER_FIELD:JMSDeliveryMode = persistent JMS_BODY_FIELD:JMSText = test2 JMS_HEADER_FIELD:JMSExpiration = 0 JMS_HEADER_FIELD:JMSMessageID = ID:unused-220-201.nrt.redhat.com-37123-1490170298745-5:1:1:1:1 JMS_HEADER_FIELD:JMSPriority = 0 JMS_HEADER_FIELD:JMSDestination = TestQueue JMS_HEADER_FIELD:JMSTimestamp = 1490170351335 JMS_HEADER_FIELD:JMSRedelivered = false JMS_HEADER_FIELD:JMSDeliveryMode = persistent

      Using message selector (--msgsel) specifying the complete JMSMessageID, purge command can remove the message.
      Using message selector(--msqsel) with wildcard for the JMSMessageID, purge command can not remove any message.

              gtully@redhat.com Gary Tully
              rhn-support-hfuruich Hisao Furuichi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: