What is the algorithmic time complexity of applying JMS selectors when consuming messages from a queue, with respect to queue depth n? In particular, is it linear (O(n)) per read? Is it implementation-dependent (on the JMS provider), and does it depend on what fields are being requested?
(if implementation dependent, I'm particularly interested in Websphere MQ and Solace's behaviour, but I welcome answers that deal with any particular JMS provider, especially if you have links to documentation describing the complexity!).
Motivation: each message has two properties: an invocationID
and a batchName
. A batch consists of several invocations. Clients wish to consume messages in one of two ways; either by invocationID
or by batchName
. At the point that messages are produced, I don't know by which method they will be consumed.
This can be implemented through selectors:
invocationID=42
Or
batchName="reconciliation"
...and I can speed one of these up by using the correlation ID instead of a custom property, but am concerned that the other will remain slow.