Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: MB-904
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dejan Bosanac
Reporter: Claudio Corsi
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
FUSE Message Broker

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

Created: 15/Jun/11 04:29 PM   Updated: 22/Jun/11 01:34 PM
Component/s: None
Affects Version/s: 5.4.2-fuse-02-00
Fix Version/s: 5.6.0-fuse-00-00

File Attachments: 1. Zip Archive testcase.zip (15 kB)

Environment: any

External Issue URL: https://issues.apache.org/jira/browse/AMQ-3374


 Description  « Hide
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.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Claudio Corsi added a comment - 15/Jun/11 05:34 PM
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.


Dejan Bosanac added a comment - 22/Jun/11 01:34 PM
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)