JMS selector that tests an undefined attribute does not match any messages -- change in behaviour

Solution Verified - Updated -

Issue

Consider a JMS message that has a property "animal". A selector like this would match and retrieve any messages where "animal" is "dog":

animal='dog'

And, of course, the following would match any message where "animal" was anything other than "dog":

animal<>'dog'

The question arises whether the selector should match messages where the value of "animal" is not set at all. Intuitively it seems that a not-equal selector should match if the attribute is missing; after all, "animal" certainly can't be "dog" if it isn't anything at all. In a sense, the value is null, and null <> 'dog'.

Selectors behaved this way in A-MQ 6.1. In 6.2 and later, however, a selector that tests any undefined attribute will match no messages.

Environment

Red Hat JBoss A-MQ
- 6.2
- 6.2.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.