geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohammed Imran" <>
Subject Messages are not being redelivered (JMS)
Date Wed, 25 Jun 2008 10:30:18 GMT
I am experiencing problems with redelivery of messages in activemq/geronimo
it seems to not redeliver the message when a system exception occurs. I know
that ActiveMQ has a max redelivery count, however the messages seem to stop
being processed after 1-2 attempts. I am not getting anywhere near the max
redelivery count. <>

I enclose a very simple example. This ear simple has 1 MDB which will
automatically throw an EJBException. (In the source code I have configured
it to use ActiveMQ default queues and connection factory this was only done
so you can quickly see what happens without setting up your own queue and
connection factory. I also enclose a runnable class which will send a
message to the queue.)

The expected result should be MDB retires 5/10/xxx amount of times whatever
the max redelivery count is set to and then stops redelivering the message.
However as I have said earlier on I am not getting this, seems to only retry

package test;

import javax.ejb.*;
import javax.jms.MessageListener;
import javax.jms.Message;

@MessageDriven(activationConfig = { @ActivationConfigProperty( propertyName
= "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty( propertyName = "destination", propertyValue =
TestMDBBean.QUEUE_NAME) ,@ActivationConfigProperty( propertyName =
"acknowledgeMode", propertyValue = "Auto-acknowledge") })
public class TestMDBBean implements MessageListener {
public static final String QUEUE_NAME = "SendReceiveQueue";//"ErrorQueue";;
public void onMessage(Message message) { System.err.println("This is a
test"); throw new EJBException("This is a lovely test"); }


<?xml version="1.0" encoding="UTF-8"?>
<resource-link>ActiveMQ RA</resource-link>


Geronimo application

<?xml version="1.0" encoding="UTF-8"?>







View raw message