|
[
Permlink
| « Hide
]
Rob Davies added a comment - 11/Jul/08 08:38 AM
Slightly different problem - but this was resolved by https://issues.apache.org/activemq/browse/AMQ-1795
We are using ActiveMQ 5.2.0 and see the same problem mentioned in this issue. It looks like the culprit is "with consumers that may become inactive for periods of time. " From the documentation, it does seem that the store clears out a log file only if it finds that there is no reference to a single message in the log file. However, with consumers that go up and down, it is possible that every log file ends up having a single persistent message that is not consumed. Hence, with a message store size of 1gb and a data file size of 32 MB, it takes around 30 messages to kill persistence, which is a very realistic scenario. Is there any method by which the files are consolidated and not held up by a single unconsumed message? Expiring the messages doesn't really work since there needs to be a consumer for messages to expire.
We are using ActiveMQ 5.2.0 and see the same problem mentioned in this issue. It looks like the culprit is "with consumers that may become inactive for periods of time. " From the documentation, it does seem that the store clears out a log file only if it finds that there is no reference to a single message in the log file. However, with consumers that go up and down, it is possible that every log file ends up having a single persistent message that is not consumed. Hence, with a message store size of 1gb and a data file size of 32 MB, it takes around 30 messages to kill persistence, which is a very realistic scenario. Is there any method by which the files are consolidated and not held up by a single unconsumed message? Expiring the messages doesn't really work since there needs to be a consumer for messages to expire.
Sudip, have you tried a 5.3-SNAPSHOT?
Could you possibly submit your test case for this scenario ? The class takes the persistent directory as an argument.., the broker is named brokerOne, for ex: <basedir>/activemq-data/brokerOne/journal
The class starts up a broker, creates a queue "consume.queue" with a normal consumer and producer. It also tries to produce to another queue "no.consume.queue" without a consumer whenever it finds a new log file has been added to the journal directory. The stats will show that adding just a single unconsumed message to each log file prevents it from being cleaned up. The issue seems to be inherent in the way persistent data files are handled in activemq. The problem is reproducible in the 5.3-SNAPSHOT too. While a fix is great, any workaround for 5.2.0 will be greatly appreciated. Sudip,
this is part of the contract when you make delivery persistent. The store cannot discard the message. Expiry with a consumer is your only option till an expiry processor can be added to activemq. see: https://issues.apache.org/activemq/browse/AMQ-1112 Thanks for the reply. It would be great if you could take the above comments into account when looking at enhancements for activemq. It would be a good improvement to not have entire log files held up by a few unconsumed messages.
one option for you may be to reduce the size of the data files, there will be more of them but the chances of them having unconsumed messages will be reduced. also, increase the checkpoint and cleanup interval.
Gary, for those of us who are concerned about the inefficient use of log files, do you think the jdbc persistence adapter is a suitable alternative?
sure, lots of folks uses it. For best performance use it with the Journal. ie: journaledJDBC
With https://issues.apache.org/activemq/browse/AMQ-1112
I'm on vacation until Monday 24th August 2009.
I will read your mail on return. Thanks, James Casey. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||