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
JCAConnectorLifecycleFactory.startConsumption();

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:
activemq-all-5.1-SNAPSHOT.jar
activemq-ra-5.1-SNAPSHOT.jar
commons-collections.jar
commons-logging.jar
commons-pool-1.3.jar
geronimo-connector-2.0.2.jar
geronimo-ejb_2.1_spec-1.0.1.jar
geronimo-j2ee-connector_1.5_spec-1.0.1.jar
geronimo-j2ee-management_1.0_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.0.jar
geronimo-jta_1.1_spec-1.0.jar
geronimo-transaction-2.0.2.jar
jencks-2.1.jar
jencks-amqpool-2.1.jar
spring-2.0.8.jar

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
"1".
(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
messages).

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.

-James
-- 
View this message in context: 
http://www.nabble.com/ERROR-RecoveryListenerAdapter---Message-id-xxxxx-could-not-be-recovered-from-the-data-store---already-dispatched-tp15821055s2354p15821055.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to