activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uttara <>
Subject Re: Lost messages - Abnormal Behaviour of activeMQ
Date Tue, 15 Jul 2014 04:57:26 GMT
Hi Tim,
Thanks for your reply,We are using Individual acknowledgement.
Actually three threads run in the background for three customers.And from
the queue we read the message based on the customer id in the message . If
the intended thread receives the message it acknowledges it. We are also
logging once after the message is read before acknowledging it. In certain
scenarios the message is being read in other two customer threads but not
for the intended customer as we could see the log points before
acknowledging it. And then to my surprise,the message gets lost. PFB the
piece of code where we have applied acknowledging strategy.

	for(int count=0;count<10;count++){			
			Object receivedMessage = queueReceiver.receiveNoWait();
			if(receivedMessage instanceof TextMessage)
				message = (TextMessage) receivedMessage; 
				try {
					objMsgVO = util.convertMessageToVO(message.getText());
				} catch (Throwable e) {
					logger.error("Invalid Json ticket data.Going to Acknowledge");
				boolean flag=false;
				for(int i=0,j=0;i<ToolsIntegratorPoller.customerName.length;i++,j++){
				{"received: " + message.getText());
					returnMassage = message.getText();
				else {
					logger.error("Message does not have a valid customer name or Customer
name is not present in the ticket data");


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

View raw message