You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2023/04/26 14:58:00 UTC

[jira] [Commented] (ARTEMIS-4260) address-setting w/ wildcard not in herited by actual address

    [ https://issues.apache.org/jira/browse/ARTEMIS-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17716761#comment-17716761 ] 

Justin Bertram commented on ARTEMIS-4260:
-----------------------------------------

I believe you're seeing the expected behavior. The wildcard syntax is not like a regular expression. It is a series of "words" separated by a delimiter ({{.}} by default, although this can be configured). Therefore you should use a syntax like this:
{code:xml}
<address-setting match="IMP.#">
    <dead-letter-address>IMP.DLQ</dead-letter-address>
    <expiry-address>IMP.ExpiryQueue</expiry-address>
</address-setting>{code}
{code:xml}
<addresses>
    <address name="IMP.MISC">
    <anycast>
        <queue name="IMP.MISC" />
    </anycast>
    </address>
</addresses>{code}
This kind of syntax is enforced because address-settings are _hierarchical_. See [the documentation|https://activemq.apache.org/components/artemis/documentation/latest/wildcard-syntax.html] for more details.

The main bit of code for this is in {{org.apache.activemq.artemis.core.settings.impl.HierarchicalObjectRepository}}.

> address-setting w/ wildcard not in herited by actual address
> ------------------------------------------------------------
>
>                 Key: ARTEMIS-4260
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4260
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.28.0
>            Reporter: arne anka
>            Priority: Minor
>
> In my broker.xml I got
> {code:java}
> <address-setting match="IMP#">
>     <dead-letter-address>IMP.DLQ</dead-letter-address>
>     <expiry-address>IMP.ExpiryQueue</expiry-address>
> </address-setting>{code}
> {code:java}
> <addresses>
>     <address name="IMP_MISC">
>     <anycast>
>         <queue name="IMP_MISC" />
>     </anycast>
>     </address>
> </addresses>
> {code}
> According to what I read in docs and examples, all adresses starting with
> {noformat}
> IMP{noformat}
> should inherit the DLQ and Expiry adresses from the address-setting.
> Yet, when starting Artemis it logs
> {code:java}
> 2023-04-26 16:05:59,810 WARN  [org.apache.activemq.artemis.core.server] AMQ222165: No Dead Letter Address configured for queue IMP_MISC in AddressSettings
> 2023-04-26 16:05:59,811 WARN  [org.apache.activemq.artemis.core.server] AMQ222166: No Expiry Address configured for queue IMP_MISC in AddressSettings {code}
> I am currently fighting my way through the code, looking for the place where the actual merging happens, but no luck so far.
> Maybe in a first step, someone can give me a pointer where to look (and maybe how to log)?
> And is there a way to see the actual configuration of an address once Artemis is up and running? Didn't find anything in the Web-Console.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)