Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5450

mKahaDB filtered wildcard <filteredKahaDB queue="*.DLQ"> doesn't pick up myqueue.DLQ

    XMLWordPrintableJSON

Details

    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

      Attachments

        Activity

          People

            gtully Gary Tully
            gtully Gary Tully
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: