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

[Priority Messages, JDBC store] priority messages seem to be slow when retrieved from store

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: JBoss A-MQ 6.1
    • Fix Version/s: None
    • Component/s: broker, jdbc
    • Labels:
      None

      Description

      Since https://issues.jboss.org/browse/ENTMQ-1064 has been introduced customer is noticing delays when using priority messages in the broker with JDBC.For testing purposes I added some logging immediately before and after the executeQuery() call in
      org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doRecoverNextMessages(). Using these just to give an approx. on query execution.| |

      LOG.info("About to call executeQuery()");
      rs = s.executeQuery();
      LOG.info("... finished executeQuery().");

      Using a local instance of MySQL for jdbc persistence store, with 2 destinations on the broker and 1 million message on each destination. The following timestamps are logged when *prioritizedMessages="false"*| 2015-09-10 17:08:46,559 | INFO | About to call executeQuery() | org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter | ActiveMQ BrokerService[localhost] Task-2|

      2015-09-10 17:08:46,641 | INFO | ... finished executeQuery(). | org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter | ActiveMQ BrokerService[localhost] Task-2

      when *prioritizedMessages="true"* the timestamps logged are| 2015-09-10 17:16:58,428 | INFO | About to call executeQuery() | org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter | ActiveMQ BrokerService[localhost] Task-21|

      2015-09-10 17:17:13,598 | INFO | ... finished executeQuery(). | org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter | ActiveMQ BrokerService[localhost] Task-21

      With prioritizedMessages="false" seems to take approx 0.2 of a second where the prioritizedMessages="true" is taking about 15 seconds.The prioritizedMessages="true" query execution time does appear to be effected by the number of message in the DB. In my setup with 600,000 messages in the DB it took approx. 5 seconds and for 2 million messages in the DB it took approximately 15 seconds.The environment is only my local machine but IMHO it does demonstrate the difference between prioritizedMessages="false" and prioritizedMessages="true"Can the prioritizedMessages="true" query be speeded up?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dbosanac Dejan Bosanac
                  Reporter:
                  pfox Patrick Fox
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: