activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srikanth03565 <>
Subject How to reattempt individual message
Date Sun, 31 Jul 2011 11:27:33 GMT

I am implementing ActiveMQ Middleware using Queue based JMS .
I am facing individual message  Rollback issue from last few days

There are multiple message posted to my activemq and one i start
activemq my session starts reading messages.I am using individual
message acknowledgement.
i.e  qConnection.createQueueSession(false,

Once i receive message in my message listener i am sending message to
child thread and processing message there and processing is completed
i am sending acknowledgement.

But problem here is if any exception comes in middle of my message i
want to reattempt for that specific message.

I have tryed session.recover here but its recovering all messages on
that session which is wrong

Please look into my message consumer and listener
           Consumer class outline
public  QueueSession session = null;

public QueueConnection qConnection = null;
        ActiveMQConnectionFactory connectionFactory = new
 	qConnection = connectionFactory.createQueueConnection();
        session = qConnection.createQueueSession(false,
        QueueReceiver _receiver =

       //my message listener
 	public void onMessage(Message message)  {
                //starting chaild thread etc
                } else {
  //want to roll back/reattempt specific message

I have trayed same thing using Transaction by commit and rollback and
client acknowledge using recover but both
are doing for multiple messages
Please help me to resolve this issue

Thanks & Regards
Srikanth Reddy

View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message