JMX Exception: "Destination already created" when recovering gigantic queues
from database
------------------------------------------------------------------------------------------
Key: AMQ-878
URL: https://issues.apache.org/activemq/browse/AMQ-878
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: incubation
Environment: Embeded broker, Any platform (OS, JDK) - currentlly
embeded in JBoss 4.0.4.GA
Reporter: Nikolai Penkov
Attachments: async-recovery.patch
I think this issue is described in Hiram's blog:
http://blogbucket.blogspot.com/2006/05/scaling-to-gigantic-queues-and-topics.html.
E.g. when broker is stopped with a lot of messages in queue. When started -
recovery process is fired (currently on creation of a queue), and if another
subscriber requests queue - it creates a new one, because previous process
hasn't finished.
I think the simpliest solution for that problem is to start recovery process in
another thread with synchronization to sent process(sent process should be
suspended till full recovery is done) and subscriber notification method (every
sunscriber should be notified on recovery of message).
I have attached a patch to activemq-core, which I have tested with my
environment - JBoss 4.0.4.GA with Embeded Broker ActiveMQ trunk release, jdbc
persistence.
I am not a spec. in threads nor in ActiveMQ design, and I am sure that you will
find a more elegant sollution to what I have provided.
--
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