FUSE Message Broker
  1. FUSE Message Broker
  2. MB-1030

mKahaDB configuration causes "activemq-data\mKahaDB\txStore" directory to be created from where activemq scripte is invoked

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 5.5.1-fuse-01-06
    • Fix Version/s: 5.5.1-fuse-02-02
    • Component/s: None
    • Labels:
      None
    • Similar Issues:
      Show 9 results 

      Description

      I configured mKahaDB for activemq broker like below:

      ...
           <persistenceAdapter>
              <mKahaDB directory="/Users/jluo/esb/esb_test/kahadb">
                  <filteredPersistenceAdapters>
      
                      <!-- match all DLQ queues -->
                      <filteredKahaDB queue="DLQ.>">
                        <persistenceAdapter>
                          <kahaDB directory="/Users/jluo/esb/esb_test/DLQ-kahadb" journalMaxFileLength="32mb"/>
                        </persistenceAdapter>
                      </filteredKahaDB>
      
                      <!-- match all queues -->
                      <filteredKahaDB queue=">">
                        <persistenceAdapter>
                          <kahaDB directory="/Users/jluo/esb/esb_test/QUEUE-kahadb" journalMaxFileLength="128mb"/>
                        </persistenceAdapter>
                      </filteredKahaDB>
      
                      <!-- match all topic queues -->
                      <filteredKahaDB>
                        <persistenceAdapter>
                          <kahaDB directory="/Users/jluo/esb/esb_test/TOPIC-kahadb" enableJournalDiskSyncs="false"/>
                        </persistenceAdapter>
                      </filteredKahaDB>
      
                  </filteredPersistenceAdapters>
              </mKahaDB>   
            </persistenceAdapter>
      ...
      

      However, the broker always creates a directory structure "activemq-data\mKahaDB\txStore\" from where the activemq scripts is invoked.

      I tested on 5.5.1-fuse-01-11 and the latest 5.5.1-fuse-SNAPSHOT, the problem still persists. I also tested on the latest Apache 5.6 SNAPSHOT build from here: https://repository.apache.org/content/groups/snapshots/org/apache/activemq/apache-activemq/5.6-SNAPSHOT/
      It worked fine. The "txStore" will be created under "/Users/jluo/esb/esb_test/kahadb/" as configured.

      Curently, for 5.5.1-fuse-01-xx, you can workaround it by setting a system property "org.apache.activemq.default.directory.prefix". It will create a directory structure $

      {prefix}

      /activemq-data/mKahaDB/txStore" instead. So you might need to change your "bin/activemq" scripts to:

      --- a/apache-activemq-5.5.1-fuse-01-06/bin/activemq
      +++ b/apache-activemq-5.5.1-fuse-01-06-modified/bin/activemq
      @@ -374,6 +374,7 @@ invokeJar(){
                     -Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
                     -Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
                     -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
      +              -Dorg.apache.activemq.default.directory.prefix=\"/Users/jluo/esb/esb_test/\" \
                     $ACTIVEMQ_CYGWIN \
                     -jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS >/dev/null 2>&1 &
                     RET=\"\$?\"; APID=\"\$!\";
      

      It might relate to this Apache JIRA: https://issues.apache.org/jira/browse/AMQ-3533

        Activity

        Hide
        Gary Tully
        added a comment -

        issue is https://issues.apache.org/jira/browse/AMQ-3515 needs to be merged to fuse branch

        Show
        Gary Tully
        added a comment - issue is https://issues.apache.org/jira/browse/AMQ-3515 needs to be merged to fuse branch
        Hide
        Gary Tully
        added a comment -

        Will be in tonight's snapshot.

        Show
        Gary Tully
        added a comment - Will be in tonight's snapshot.

          People

          • Assignee:
            Gary Tully
            Reporter:
            Joe Luo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: