Memory Leak: OutOfMemoryException throws if TopicSubscriber.receive(timeout) is
used to pull JMS messages
---------------------------------------------------------------------------------------------------------
Key: AMQ-1115
URL: https://issues.apache.org/activemq/browse/AMQ-1115
Project: ActiveMQ
Issue Type: Bug
Components: JMS client
Affects Versions: 4.1.0
Environment: Windows XP Professional, JDK 1.5
Reporter: Sam Zhou
Attachments: ActiveMq Tester.zip
Attached sources can generate OutOfMemoryException when ActiveMQ pulls messages
by using TopicSubscriber.receive(timeout), on the other hand, if I use callback
TopicSubscriber.onMessage(), all the messages are received without any problem.
Please see README.TXT for detail usage of the program.
Assume I set prefetch=50, publisherCount=10, subscriberCount=10, each publisher
publishs 500 messages, and each message size is 100kb,
If I use callback (option -msgcallback given in command line), e.g.,
TopicSubscriber.onMessage(), all 50,000 messages are received without error.
if I don't use callback (option -msgcallback not given in command line), e.g.,
TopicSubscriber.receive(timeout), after receiving about a thousand of messages,
OutOfMemory error occurs, and the program starts to throw Exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira