tabish121 commented on code in PR #6148: URL: https://github.com/apache/artemis/pull/6148#discussion_r2628659955
########## docs/user-manual/filter-expressions.adoc: ########## @@ -57,24 +57,31 @@ The value is an integer. Any other identifiers used in core filter expressions will be assumed to be properties of the message. -The JMS and Jakarta Messaging specs state that a String property should not get converted to a numeric when used in a selector. -So for example, if a message has the `age` property set to `String` `21` then the following selector should not match it: `age > 18`. -STOMP clients, for example, can only send messages with string properties, which is a bit limiting. -Therefore, if you want your filter expressions to auto-convert `String` properties to the appropriate number type, just prefix it with `convert_string_expressions:`. -If you changed the filter expression in the previous example to be `convert_string_expressions:age > 18`, then it would match the aforementioned message. +== Property Identifier Constraints -The JMS and Jakarta Messaging specs also state that property identifiers (and therefore the identifiers which are valid for use in a filter expression) are an: +The JMS and Jakarta Messaging specs state that property identifiers (and therefore the identifiers which are valid for use in a filter expression) are an: ____ unlimited-length sequence of letters and digits, the first of which must be a letter. -A letter is any character for which the method `Character.isJavaLetter` returns `true`. +A letter is any character for which the method https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Character.html#isJavaLetter(char)[`Character.isJavaLetter`] returns `true`. This includes `_` and `$`. -A letter or digit is any character for which the method `Character.isJavaLetterOrDigit` returns `true`. +A letter or digit is any character for which the method https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Character.html#isJavaLetterOrDigit(char)[`Character.isJavaLetterOrDigit`] returns `true`. ____ -This constraint means that hyphens (i.e. `-`) cannot be used. -However, this constraint can be overcome by using the `hyphenated_props:` prefix. -For example, if a message had the `foo-bar` property set to `0` then the filter expression `hyphenated_props:foo-bar = 0` would match it. +=== Avoiding These Constraints Review Comment: I might title this "Working Around These Constraints" to match the wording in the text that below. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
