[ https://issues.apache.org/jira/browse/AMQ-3404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Allen Reese updated AMQ-3404: ----------------------------- Comment: was deleted (was: I've dug into this further, and it seems like message selectors don't work like I would expect them to when used over JMX. I have this test ugly and messy test code: import java.lang.management.ManagementFactory; import java.util.Arrays; import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.Map; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.QueueBrowser; import javax.jms.QueueConnection; import javax.jms.QueueRequestor; import javax.jms.QueueSession; import javax.jms.Session; import javax.jms.TextMessage; import javax.management.MBeanServerConnection; import javax.management.ObjectInstance; import javax.management.ObjectName; import javax.management.openmbean.CompositeData; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.console.util.JmxMBeansUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.testng.Assert; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; public class TestBroker // implements MessageListener { protected static final int MESSAGE_COUNT = 10; private static final Logger LOG = LoggerFactory.getLogger(TestBroker.class); protected static final String PROPERTY_NAME = "XYjavaProperty"; protected static final String PROPERTY_VALUE = "1"; protected static final String MSG_SEL_WITH_PROPERTY = PROPERTY_NAME + " is not null" ; protected static final String MSG_SEL_WITHOUT_PROPERTY = PROPERTY_NAME + " is null"; private static final String QUEUE_NAME = "org.apache.activemq.network.jms.QueueBridgeTest"; protected AbstractApplicationContext context; protected QueueConnection localConnection; // protected QueueConnection remoteConnection; protected QueueRequestor requestor; protected QueueSession requestServerSession; protected MessageConsumer requestServerConsumer; protected MessageProducer requestServerProducer; protected Queue theQueue; @BeforeTest protected void setUp() throws Exception { context = createApplicationContext(); createConnections(); requestServerSession = localConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); theQueue = requestServerSession.createQueue(QUEUE_NAME); requestServerConsumer = requestServerSession.createConsumer(theQueue); // requestServerConsumer.setMessageListener(this); requestServerProducer = requestServerSession.createProducer(null); QueueSession session = localConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); requestor = new QueueRequestor(session, theQueue); } protected void createConnections() throws JMSException { ActiveMQConnectionFactory fac = (ActiveMQConnectionFactory) context .getBean("localFactory"); localConnection = fac.createQueueConnection(); localConnection.start(); // fac = (ActiveMQConnectionFactory) context.getBean("remoteFactory"); // remoteConnection = fac.createQueueConnection(); // remoteConnection.start(); } protected AbstractApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("queue-config.xml"); } @AfterTest protected void tearDown() throws Exception { cleanup(); localConnection.close(); } @SuppressWarnings("unchecked") @Test(enabled = true) public void testWithProperty() throws Exception { for (int i = 0; i < MESSAGE_COUNT; i++) { TextMessage msg = requestServerSession .createTextMessage("test msg: " + i); msg.setStringProperty(PROPERTY_NAME, PROPERTY_VALUE); requestServerProducer.send(theQueue, msg); } for (int i = 0; i < MESSAGE_COUNT; i++) { TextMessage msg = requestServerSession .createTextMessage("test msg: " + i); requestServerProducer.send(theQueue, msg); } QueueBrowser withPropertyBrowser = requestServerSession.createBrowser( theQueue, MSG_SEL_WITH_PROPERTY); QueueBrowser withoutPropertyBrowser = requestServerSession .createBrowser(theQueue, MSG_SEL_WITHOUT_PROPERTY); QueueBrowser allBrowser = requestServerSession.createBrowser(theQueue); int withCount = getMessageCount(withPropertyBrowser, "withProperty "); int withoutCount = getMessageCount(withoutPropertyBrowser, "withoutProperty "); int allCount = getMessageCount(allBrowser, "allMessages "); Assert.assertEquals(withCount, MESSAGE_COUNT); Assert.assertEquals(withoutCount, MESSAGE_COUNT); Assert.assertEquals(allCount, MESSAGE_COUNT * 2); System.out.println("withCount = " + withCount + "\n withoutCount = " + withoutCount + "\n allCount = " + allCount + "\n = " + "\n"); MBeanServerConnection jmxConnection = ManagementFactory .getPlatformMBeanServer(); List<String> tokens = Arrays.asList(new String[] { "*" }); for (Iterator<String> i = tokens.iterator(); i.hasNext();) { List queueList = JmxMBeansUtil.queryMBeans(jmxConnection, "Type=Queue,Destination=" + i.next() + ",*"); for (Iterator j = queueList.iterator(); j.hasNext();) { ObjectName queueName = ((ObjectInstance) j.next()) .getObjectName(); List messages = JmxMBeansUtil.createMessageQueryFilter( jmxConnection, queueName).query( Arrays.asList(new String[] { MSG_SEL_WITH_PROPERTY })); // System.out.println(messages); for (Object o : messages) { CompositeData msg = (CompositeData) o; // System.out.println("Got: " + msg.get("JMSMessageID") + // " " + msg.get("value")); Map<Object, Object> map = (Map<Object, Object>) msg .get("StringProperties"); CompositeData value = (CompositeData) map.get(new String[]{PROPERTY_NAME}); System.out.println("Got: " + msg.get("JMSMessageID") + " " + ((null!=value)?value.get("key"):"null")); // System.out.println(""+msg.getClass().getCanonicalName()); } } } } public int getMessageCount(QueueBrowser browser, String prefix) throws JMSException { Enumeration e = browser.getEnumeration(); int with = 0; while (e.hasMoreElements()) { Object o = e.nextElement(); System.out.println(prefix + o); with++; } return with; } @Test(enabled = true) public void testWithoutProperty() throws JMSException { for (int i = 0; i < MESSAGE_COUNT; i++) { TextMessage msg = requestServerSession .createTextMessage("test msg: " + i); requestServerProducer.send(theQueue, msg); } } public void cleanup() throws JMSException { for (int i = 0; i < MESSAGE_COUNT * 2; i++) { requestServerConsumer.receive(); } } @Test(enabled = false) public void testQueueRequestorOverBridge() throws JMSException { for (int i = 0; i < MESSAGE_COUNT; i++) { TextMessage msg = requestServerSession .createTextMessage("test msg: " + i); TextMessage result = (TextMessage) requestor.request(msg); Assert.assertNotNull(result); LOG.info(result.getText()); System.out.println(result.getText() + " " + result.getStringProperty(PROPERTY_NAME)); } } public void onMessage(Message msg) { try { TextMessage textMsg = (TextMessage) msg; String prop = textMsg.getStringProperty(PROPERTY_NAME); if (null != prop) return; String payload = "REPLY: " + textMsg.getText(); Destination replyTo; replyTo = msg.getJMSReplyTo(); textMsg.clearBody(); textMsg.setText(payload); requestServerProducer.send(replyTo, textMsg); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } I expect the JMX message selector to send back only the ones with the property set, much like it does on a queue, here is the output: log4j:ERROR Could not find value for key log4j.appender.FILE log4j:ERROR Could not instantiate appender named "FILE". Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1551f60: display name [org.springframework.context.support.ClassPathXmlApplicationContext@1551f60]; startup date [Tue Jul 19 12:21:54 PDT 2011]; root of context hierarchy Loading XML bean definitions from class path resource [queue-config.xml] Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@1551f60]: org.springframework.beans.factory.support.DefaultListableBeanFactory@497934 Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@497934: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,localbroker,localFactory]; root of factory hierarchy Using Persistence Adapter: MemoryPersistenceAdapter ActiveMQ null JMS Message Broker (localbroker) is starting For help or more information please see: http://activemq.apache.org/ JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi Listening for connections at: tcp://localhost:61234 Connector tcp://localhost:61234 Started ActiveMQ JMS Message Broker (localbroker, ID:GLOBVALUE-LX-3747-1311103315392-0:0) started withProperty ActiveMQTextMessage {commandId = 10, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@1701bdc, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 0} withProperty ActiveMQTextMessage {commandId = 11, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:2, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@1353249, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 1} withProperty ActiveMQTextMessage {commandId = 12, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:3, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@1786286, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 2} withProperty ActiveMQTextMessage {commandId = 13, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:4, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@8c5ea2, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 3} withProperty ActiveMQTextMessage {commandId = 14, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:5, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@198defc, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 4} withProperty ActiveMQTextMessage {commandId = 15, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:6, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@1579a30, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 5} withProperty ActiveMQTextMessage {commandId = 16, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:7, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@4bfe6b, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 6} withProperty ActiveMQTextMessage {commandId = 17, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:8, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@12c5431, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 7} withProperty ActiveMQTextMessage {commandId = 18, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:9, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@14b6bed, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 8} withProperty ActiveMQTextMessage {commandId = 19, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:10, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316111, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@9aba32, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 9} withoutProperty ActiveMQTextMessage {commandId = 20, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:11, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 0} withoutProperty ActiveMQTextMessage {commandId = 21, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:12, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 1} withoutProperty ActiveMQTextMessage {commandId = 22, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:13, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 2} withoutProperty ActiveMQTextMessage {commandId = 23, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:14, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 3} withoutProperty ActiveMQTextMessage {commandId = 24, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:15, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 4} withoutProperty ActiveMQTextMessage {commandId = 25, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:16, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 5} withoutProperty ActiveMQTextMessage {commandId = 26, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:17, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 6} withoutProperty ActiveMQTextMessage {commandId = 27, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:18, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 7} withoutProperty ActiveMQTextMessage {commandId = 28, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:19, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 8} withoutProperty ActiveMQTextMessage {commandId = 29, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:20, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 9} allMessages ActiveMQTextMessage {commandId = 10, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@14eaec9, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 0} allMessages ActiveMQTextMessage {commandId = 11, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:2, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@b533b8, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 1} allMessages ActiveMQTextMessage {commandId = 12, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:3, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@569c60, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 2} allMessages ActiveMQTextMessage {commandId = 13, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:4, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@3468f4, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 3} allMessages ActiveMQTextMessage {commandId = 14, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:5, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@6db724, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 4} allMessages ActiveMQTextMessage {commandId = 15, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:6, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@112da40, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 5} allMessages ActiveMQTextMessage {commandId = 16, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:7, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316001, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@b6d6ab, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 6} allMessages ActiveMQTextMessage {commandId = 17, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:8, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316001, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@1c7865b, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 7} allMessages ActiveMQTextMessage {commandId = 18, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:9, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@45c97b, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 8} allMessages ActiveMQTextMessage {commandId = 19, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:10, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@1aecc3a, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {XYjavaProperty=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 9} allMessages ActiveMQTextMessage {commandId = 20, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:11, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 0} allMessages ActiveMQTextMessage {commandId = 21, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:12, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 1} allMessages ActiveMQTextMessage {commandId = 22, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:13, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 2} allMessages ActiveMQTextMessage {commandId = 23, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:14, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 3} allMessages ActiveMQTextMessage {commandId = 24, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:15, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 4} allMessages ActiveMQTextMessage {commandId = 25, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:16, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 5} allMessages ActiveMQTextMessage {commandId = 26, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:17, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 6} allMessages ActiveMQTextMessage {commandId = 27, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:18, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 7} allMessages ActiveMQTextMessage {commandId = 28, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:19, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 8} allMessages ActiveMQTextMessage {commandId = 29, responseRequired = true, messageId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:20, originalDestination = null, originalTransactionId = null, producerId = ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1, destination = queue://org.apache.activemq.network.jms.QueueBridgeTest, transactionId = null, expiration = 0, timestamp = 1311103316017, arrival = 0, brokerInTime = 1311103316017, brokerOutTime = 1311103316126, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = test msg: 9} withCount = 10 withoutCount = 10 allCount = 20 = Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:1 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:2 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:3 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:4 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:5 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:6 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:7 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:8 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:9 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:10 XYjavaProperty Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:11 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:12 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:13 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:14 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:15 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:16 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:17 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:18 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:19 null Got: ID:GLOBVALUE-LX-3747-1311103315392-2:0:1:1:20 null PASSED: testWithProperty PASSED: testWithoutProperty =============================================== Default test Tests run: 2, Failures: 0, Skips: 0 =============================================== ActiveMQ Message Broker (localbroker, ID:GLOBVALUE-LX-3747-1311103315392-0:0) is shutting down Connector tcp://localhost:61234 Stopped ActiveMQ JMS Message Broker (localbroker, ID:GLOBVALUE-LX-3747-1311103315392-0:0) stopped Notice the with, without and all done via the queueBrowser work as expected, but the jmx version doesn't seem to be right. ) > 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