activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "srikanth reddy (JIRA)" <>
Subject [jira] [Created] (AMQ-3423) How to reattempt individual message
Date Thu, 28 Jul 2011 17:27:10 GMT
How to reattempt individual message

                 Key: AMQ-3423
             Project: ActiveMQ
          Issue Type: Task
         Environment: Linux
            Reporter: srikanth reddy


I am implementing ActiveMQ Middleware using point to point .
I am facing this 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, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);

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

Please look into my message consumer and listener
           Consumer class outline
public  QueueSession session = null;
public QueueConnection qConnection = null;
	ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);       
 	qConnection = connectionFactory.createQueueConnection();
	session = qConnection.createQueueSession(false, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
        QueueReceiver _receiver =

 	public void onMessage(Message message)  {
		//starting chaild thread etc  
		} else {
  			//want to roll back particlur message

Please help me to resolve this issue

Thanks & Regards
Srikanth Reddy

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message