Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3280

Add support for message selectors and message headers in maven-activemq-perf-plugin.

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      The maven ActiveMQ performance plugin can be used as a general test framework.
      It currently lacks support for specifying message selectors in the consumer.
      I request this support to be added and attach a possible implementation.

      In this implementation, the consumer additionally supports the following configuration option:

      -Dconsumer.messageSelector="MyHeader = 'MyValue' AND JMSType = 'car'"
      

      You can specify message selector criterias, as explained in http://activemq.apache.org/selectors.html. However this implementation only supports header based criterias.

      In order to produce messages that match the message selector of the consumer it is necessary to also extend the producer to support message headers.
      On the producer side message headers can be specified using this arguments

      -Dproducer.header="JMSType=car:MyHeader=MyValue"
      

      whereby each header follows the syntax name=value and multiple headers can be separated using ':' on the same line.
      There can only be one occurrence of -Dproducer.header. If multiple are specified, they will override each other.
      Hence multiple headers need to be separated by ':'

      The sample message header configuration of the producer above will match the message selector configuration of the consumer above.

      If this patch gets accepted, the documentation of the maven-activemq-perf-plugin needs to be updated as well.

      Attachments

        1. AMQ-3280.patch
          10 kB
          Torsten Mielke

        Activity

          People

            dejanb Dejan Bosanac
            tmielke Torsten Mielke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: