You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Stephan Burkard <sb...@gmail.com> on 2015/07/28 10:55:50 UTC

Destination wildcard at first path token

Hi

We prefix all destination names with an environment shortcut, e.g.
test.mycomponent.process, prod.mycomponent.process etc.

To configure special destination demands, I tried to create an environment
agnostic configuration I can distribute on all broker machines like this:

<policyEntry queue="*.mycomponent.process" ...>

BUT that doesn't work.

The config entry seems to be ignored when the wildcard is at the first
position of the path. Wildcards at other positions work fine.

Since I would like to have a "grouped" view of all destinations of an
environment (some brokers host multiple environments, therefore we need
that prefix) it is not an option to move the environment shortname to the
right.

I could of course pack the destination configs for ALL environments into
the same configfile. But it's kind of confusing to have destinations
configured that are not hosted on the local broker.

Is there any other trick to solve this?

Thanks
Stephan

Re: Destination wildcard at first path token

Posted by Tim Bain <tb...@alumni.duke.edu>.
One trick would be to prepend a meaningless prefix to all destinations that
match your pattern, so dev.mycomponent.process becomes
a.dev.mycomponent.process and your pattern becomes
"a.*.mycomponent.process" which no longer has the wildcard in the first
position.  It might not be too unpalatable if the prefix you chose was
something meaningful to that grouping of destinations (e.g. "cfg") instead
of "a" in my example.

With that being said, I'm not aware of any fundamental reason why what you
tried to do shouldn't work (though of course someone else might point out
something I haven't thought of), so submit a bug in JIRA to get it fixed.

Tim

On Tue, Jul 28, 2015 at 2:55 AM, Stephan Burkard <sb...@gmail.com> wrote:

> Hi
>
> We prefix all destination names with an environment shortcut, e.g.
> test.mycomponent.process, prod.mycomponent.process etc.
>
> To configure special destination demands, I tried to create an environment
> agnostic configuration I can distribute on all broker machines like this:
>
> <policyEntry queue="*.mycomponent.process" ...>
>
> BUT that doesn't work.
>
> The config entry seems to be ignored when the wildcard is at the first
> position of the path. Wildcards at other positions work fine.
>
> Since I would like to have a "grouped" view of all destinations of an
> environment (some brokers host multiple environments, therefore we need
> that prefix) it is not an option to move the environment shortname to the
> right.
>
> I could of course pack the destination configs for ALL environments into
> the same configfile. But it's kind of confusing to have destinations
> configured that are not hosted on the local broker.
>
> Is there any other trick to solve this?
>
> Thanks
> Stephan
>