Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.10.0
Description
the activemq destination map does not support prefix matching on multiple paths but you can provide multiple wildcard matches via a composite destination today using a comma separated list.
In the main, "a.dlq" will match
"*.dlq"
, but a.b.dlq needs a
"*.*.dlq"
- so there needs to be a match to the number of expected paths to the number of wildcards. Having extra matches is not a problem.
A composite destination like
("*.DLQ,*.*.DLQ,*.*.*.DLQ")
will give match FOO.DLQ, FOO.BAR.DLQ and FOO.BAR.BAR.DLQ etc.
There is a problem with the match all destinations mapping, if there is no destination configured then an Any destination (with composite of Queue=">" and Topic=">" is used under the covers, it has a physical name of "0" which is > than the first character of *.DLQ" so it gets picked first in error.
A workaround is to add your own default mapping for queues and topics
<mKahaDB directory="${data}/kahadb" > <filteredPersistenceAdapters> <!-- match up to 3 paths that end in .DLQ --> <filteredKahaDB queue="*.*.*.DLQ,*.*.DLQ,*.DLQ"> <persistenceAdapter> <kahaDB journalMaxFileLength="5kb"/> </persistenceAdapter> </filteredKahaDB> <!-- match all queues, specify a wildcard dest to avoid the Any under the covers --> <filteredKahaDB queue=">" > <persistenceAdapter> <kahaDB journalMaxFileLength="10kb"/> </persistenceAdapter> </filteredKahaDB> <!-- match all topics, specify a wildcard dest to avoid the Any under the covers --> <filteredKahaDB topic=">" > <persistenceAdapter> <kahaDB journalMaxFileLength="10kb"/> </persistenceAdapter> </filteredKahaDB> </filteredPersistenceAdapters> </mKahaDB>
rather than use a filteredKahaDB and not specify a destination, with the default "all" behaviour