activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Martin <>
Subject ERROR RecoveryListenerAdapter - Message id xxxxx could not be recovered from the data store - already dispatched
Date Tue, 04 Mar 2008 06:15:53 GMT

I have been consistently receiving the following error message when using
Jenck with ActiveMQ for pooled inbound JMS:  "ERROR RecoveryListenerAdapter
- Message id xxxxx could not be recovered from the data store - already
dispatched" on the broker. Once the error message occurs, none of the
messages on the queue associated with the error can be received. Not even
after a broker restart. I have to delete the data folder and send the
messages again.

Here is my setup:
I have a single sender that puts messages onto "Queue.1". I also have eight
MDPs that listen on "Queue.1" through "Queue.8", do something with a
message, then pass it onto the next queue in the chain (i.e. MDP #1 receives
from "Queue.1" and sends to "Queue.2").

A TransactionManager, WorkManager, BootstrapContext,
ActiveMQConnectionFactory, JCAContainer, and ActiveMQResourceAdapter are
shared between the MDPs. For each MDP that I want to consume messages, I
create a ActiveMQActivationSpec and a Jencks SingletonEndpointFactory and
configure a JCAConnectorLifecycleFactory, then call

I am using the newest version of ActiveMQ (SVN revison 633364), built from
source, using the default configuration, except for the flow control stuff
described below. I have tested running the broker on Windows XP and Ubuntu
Server 7.10. Both machines have the same specs: 3.0GHz P4, 2.0 GB RAM. I
have only rand the MDPs from a Windows XP machine.  It usually takes longer
for the error to start happening on the Linux machine, but other than that
there is no difference.

Here are all the jars I am using on the classpath:

For testing purposes, I send 25-50,000 small text messages onto "Queue.1"
and create 15 to 25 MDP per queue in the eight queue chain. Eventually, I
get the RecoveryListenerAdapter  error message and consumption will halt.
There are several different configuration which cause the problem and only
one to fix it, which kills performance.

Here is the only way I can avoid the problem (all conditions must be met):
(1) Never use asynchronous sends.
(2) Enable flow control on all involved queues.
(3) The maxSessions property on the ActiveMQActivationSpec must be set to
(4) The maxMessagesPerSessions property on the ActiveMQActivationSpec must
be set to "1".

If (4) is not met, the error happens almost immediately (within 1-10

If (1), (3), and (4) are met, then I can get away with disabling flow
control for some time, but the error still occurs after several hundred
thousand messages have been sent.

If (2), (3), and (4) are met the error appears to go away but again after
several hundred thousand messages have been sent it occurs again.

Has anyone else had this problem? I would really like to be able to set the
maxSessions property to something greater than one and use asynchronous
sends to boost the performance and allow for more concurrency.  Any help or
insight would be greatly appreciated.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message