Uploaded image for project: 'FUSE Message Broker'
  1. FUSE Message Broker
  2. MB-904

Kahadb will purge all of the messages from an unsubscribed durable subscription within a single kahadb transaction possibly causing an OOM exception.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.4.2-fuse-02-00
    • Fix Version/s: 5.6.0-fuse-00-00
    • Component/s: None
    • Labels:
      None
    • Environment:
      any
    • Similar Issues:
      Show 9 results 

      Description

      If we have a case in which there is a long running durable subscription that is consuming less messages than a producer is creating. If the durable subscription then decides to unsubscribe the kahadb will perform a cleanup. As part of the cleanup it will determine all messages that will no longer be consumed. During that process it will start a single transaction and process all of those messages at once. If there are more messages than there is available memory then the broker will generate a oom exception.

      The kahadb should process the purging process through one or more transactions depending on the size of messages that need to be purged.

        Gliffy Diagrams

          Activity

          Hide
          ccorsi1 Claudio Corsi added a comment -

          Attaching testcase that reproduces this issue.

          You will need to start a broker in a separate termine since the test is decoupled from the broker

          You will need to use the configuration file that is located within the src/test/resources directory.

          You can run the test by using the "mvn test" command.

          Show
          ccorsi1 Claudio Corsi added a comment - Attaching testcase that reproduces this issue. You will need to start a broker in a separate termine since the test is decoupled from the broker You will need to use the configuration file that is located within the src/test/resources directory. You can run the test by using the "mvn test" command.
          Hide
          dbosanac Dejan Bosanac added a comment -

          This should be fixed now and available in the latest (20110622.131151-32) snapshot from

          http://repo.fusesource.com/nexus/content/repositories/snapshots/org/apache/activemq/apache-activemq/5.5-fuse-SNAPSHOT

          Now we define max kahadb tx size and spool to temporary file if it gets larger.

          I didn't test performance yet. To tune performance customer could experiment with max kahadb size. By default it's 10MB and it could be changed by setting maxKahaDBTxSize system property (in bytes - default 10485760)

          Show
          dbosanac Dejan Bosanac added a comment - This should be fixed now and available in the latest (20110622.131151-32) snapshot from http://repo.fusesource.com/nexus/content/repositories/snapshots/org/apache/activemq/apache-activemq/5.5-fuse-SNAPSHOT Now we define max kahadb tx size and spool to temporary file if it gets larger. I didn't test performance yet. To tune performance customer could experiment with max kahadb size. By default it's 10MB and it could be changed by setting maxKahaDBTxSize system property (in bytes - default 10485760)

            People

            • Assignee:
              dbosanac Dejan Bosanac
              Reporter:
              ccorsi1 Claudio Corsi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: