Why do I get slow performance when I use message selectors with contested queues.
Because JMS is not an RDMS
When you run the message selector it will use "read and skip", the queue is not indexed like a database table.
It will start at the first message in the queue and check each individually to see whether it matches the selector. It has to do this for every receive()
If few (or even worse none) match the selector, it will have to check lots (all) of messages. This will be especially bad when messages towards the bottom of the queue are not in memory, meaning it has to load the message into memory to look at the properties.