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

Removing messages in Hawtio console causes incorrect maxBrowsePageSize generation.

    XMLWordPrintable

Details

    • Hide

      *Step-1).* Take A-MQ 6.1 and then edit "activemq.xml" file to add the "maxBrowsePageSize" as 500.

                      <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb" maxBrowsePageSize="500">
      

      *Step-2).* Now send 520 messages to a jms queue (suppose TestQ) the jms messages should have a header set as following:

           public static void main(String ar[]) throws Exception {
               ActiveMQ_QueueSend senderAQ=new ActiveMQ_QueueSend("admin","admin","failover://tcp://localhost:61616","queue://TestQ");
               for (int i=1; i<=520 ; i++) {
                        senderAQ.sendTestMessage("HelloWorld-"+i,i);
               }
               senderAQ.defaultConnection.close();
            }
      
           public void sendTestMessage(String txt,int sequence) throws JMSException {
               TextMessage message=this.createTestMessage(txt);
               // JMS Message selector 
               message.setIntProperty("JMSXGroupSeq",sequence);       
               this.producer.send(message);      
            }
      

      *Step-3).* After sending 520 messages to TestQ, Check hawetio it shows 500 messages (so far every thing is right)
      http://localhost:8181/hawtio/index.html#/activemq/browseQueue?tab=activemq&nid=root-org.apache.activemq-Broker-amq-Queue-TestQ

      *Step-4).* Now delete some 3 messages from TestQ using operation "Remove matching messages(java.lang.string)" from the queue using the following Selector:

            JMSXGroupSeq between 498 and 500
      

      Users will find 3 messages were deleted.

      *Step-5).* Now Browse messages again last few messages will be the following : (Notice 501 is missing)

      496, 497, 502 , 503
      Example:

      D:localhost-38909-1403756014866-1:1:1:1:503
      D:localhost-38909-1403756014866-1:1:1:1:502
      D:localhost-38909-1403756014866-1:1:1:1:497
      D:localhost-38909-1403756014866-1:1:1:1:496
      

      So the issue is that the "501" message is missing from the browse page.

      Show
      * Step-1). * Take A-MQ 6.1 and then edit "activemq.xml" file to add the "maxBrowsePageSize" as 500. <policyEntry queue= ">" producerFlowControl= " true " memoryLimit= "1mb" maxBrowsePageSize= "500" > * Step-2). * Now send 520 messages to a jms queue (suppose TestQ) the jms messages should have a header set as following: public static void main( String ar[]) throws Exception { ActiveMQ_QueueSend senderAQ= new ActiveMQ_QueueSend( "admin" , "admin" , "failover: //tcp://localhost:61616" , "queue://TestQ" ); for ( int i=1; i<=520 ; i++) { senderAQ.sendTestMessage( "HelloWorld-" +i,i); } senderAQ.defaultConnection.close(); } public void sendTestMessage( String txt, int sequence) throws JMSException { TextMessage message= this .createTestMessage(txt); // JMS Message selector message.setIntProperty( "JMSXGroupSeq" ,sequence); this .producer.send(message); } * Step-3). * After sending 520 messages to TestQ, Check hawetio it shows 500 messages (so far every thing is right) http://localhost:8181/hawtio/index.html#/activemq/browseQueue?tab=activemq&nid=root-org.apache.activemq-Broker-amq-Queue-TestQ * Step-4). * Now delete some 3 messages from TestQ using operation "Remove matching messages(java.lang.string)" from the queue using the following Selector: JMSXGroupSeq between 498 and 500 Users will find 3 messages were deleted. * Step-5). * Now Browse messages again last few messages will be the following : (Notice 501 is missing) 496, 497, 502 , 503 Example: D:localhost-38909-1403756014866-1:1:1:1:503 D:localhost-38909-1403756014866-1:1:1:1:502 D:localhost-38909-1403756014866-1:1:1:1:497 D:localhost-38909-1403756014866-1:1:1:1:496 So the issue is that the "501" message is missing from the browse page.

    Description

      • When a "maxBrowsePageSize" is defined in the Destination policy then as soon as some messages are deleted from the hawtio console using operation "Remove matching messages(java.lang.string)" then the hawtio console shows incorrect number of messages during the queue browse.

      Attachments

        Issue Links

          Activity

            People

              dejanbosanac Dejan Bosanac
              jaysensharma Jay SenSharma (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: