users@jms-spec.java.net

[jms-spec users] Re: JMS_SPEC-134: Declarative Annotation Based JMS Listeners

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Fri, 4 Sep 2015 12:38:12 +0100

Werner,

(Correcting subject line)

On 03/09/2015 15:51, Werner Keil wrote:
> Hi,
>
> This is currently working from JMS 1 on:
> @MessageDriven(name = "AQueue", activationConfig = {
> @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "JMSCorrelationID='12345'")
>
> Making the messageSelector property a first class annotation should make it a little more intuitive, but I don't see how
> get it to understand properties, values or expressions like "JMSCorrelationID='12345'" or "ticker='ORCL'" at compile
> time. If you say mis-spell it "JMSCorelationID='12345'" that won't be noticed at compile time. Not sure, if there was a
> solution here that would already notice such things before running/debugging your apps.

The issue there is that JMS message selectors are defined using a SQL-like syntax of their own, which is not checked at
compile time.

The issue Evans was raising is whether you can specify the message selector (defined as it is now) on a CDI-based JMS
listener bean at runtime. He's made some useful suggestions, but I don't think we've found a good answer yet.

Nigel