Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-793

JMS selectors don't work with topic-to-queue diverts (with AMQP)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • AMQ 7.0.1.GA
    • None
    • Release Notes
    • Previously, when a divert was used to route messages from a topic to a queue, no messages were consumed after a consumer attached to the target queue using a selector expression. This issue is fixed in version 7.1.
    • Documented as Resolved Issue
    • Hide

      1. Install AMQ 7.0.1 GA
      2. "artemis create xxx"
      3. Unpack the attached amqsel.zip
      4. mvn package
      5. Copy the bundled broker.xml to the newly-created broker instance, and start it
      6. Run the test client:

      $ java -jar target/amqsel-0.1.0-jar-with-dependencies.jar

      Note that no messages are consumed. The test class App.java has commented-out modifications that produce and consume to the same queue, with the selector, and consume from the divert without the selector, and these both pass – messages are consumed.

      Show
      1. Install AMQ 7.0.1 GA 2. "artemis create xxx" 3. Unpack the attached amqsel.zip 4. mvn package 5. Copy the bundled broker.xml to the newly-created broker instance, and start it 6. Run the test client: $ java -jar target/amqsel-0.1.0-jar-with-dependencies.jar Note that no messages are consumed. The test class App.java has commented-out modifications that produce and consume to the same queue, with the selector, and consume from the divert without the selector, and these both pass – messages are consumed.

      When a <divert> is used to route messages from a topic to a queue, and when a consumer attaches to the target queue using a selector expression, then no messages are consumed, even though the message headers match the selector.

      In some (but not all) circumstances, an error message is seen in the broker log:

      ~~~
      08:57:44,807 ERROR [org.apache.activemq.artemis.core.server] AMQ224006: Invalid filter: filename='XXX'
      ~~~

              sknot@redhat.com Stanislav Knot (Inactive)
              rhn-support-kboone Kevin Boone
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: