[
https://issues.apache.org/jira/browse/ARTEMIS-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christopher L. Shannon updated ARTEMIS-2531:
--------------------------------------------
Description:
FederatedQueue by default is supposed to set a metadataFilter to will exclude
reacting to federated consumers so a loop isn't created. Unfortunately the
filter does not work because there is a hyphen in the name so it gets ignored.
The property needs to be prefixed with "hyphenated_props:" for the filter to
work. Currently an infinite loop and consumers will be rapidly created until
crashing the broker unless the filter is fixed (if using by directional
federated queues)
The following documentation describes hyphens in filter expressions:
[https://activemq.apache.org/components/artemis/documentation/latest/filter-expressions.html]
>From the docs:
{noformat}
The JMS spec also states 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. This includes _ and $. A letter or digit is any character for
which the method 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.
{noformat}
was:FederatedQueue by default is supposed to set a metadataFilter to will
exclude reacting to federated consumers so a loop isn't created. Unfortunately
the filter does not work because there is a hyphen in the name so it gets
ignored. The property needs to be prefixed with "hyphenated_props:" for the
filter to work. Currently an infinite loop and consumers will be rapidly
created until crashing the broker unless the filter is fixed (if using by
directional federated queues)
> FederatedQueue has invalid filter string leading to an infinite consumer loop
> -----------------------------------------------------------------------------
>
> Key: ARTEMIS-2531
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2531
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.10.1
> Reporter: Christopher L. Shannon
> Assignee: Christopher L. Shannon
> Priority: Major
> Fix For: 2.11.0
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> FederatedQueue by default is supposed to set a metadataFilter to will exclude
> reacting to federated consumers so a loop isn't created. Unfortunately the
> filter does not work because there is a hyphen in the name so it gets
> ignored. The property needs to be prefixed with "hyphenated_props:" for the
> filter to work. Currently an infinite loop and consumers will be rapidly
> created until crashing the broker unless the filter is fixed (if using by
> directional federated queues)
> The following documentation describes hyphens in filter expressions:
> [https://activemq.apache.org/components/artemis/documentation/latest/filter-expressions.html]
> From the docs:
> {noformat}
> The JMS spec also states 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. This includes _ and $. A letter or digit
> is any character for which the method 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.
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)