activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: Duplicate message delivered to consumers on queue with kaha persistence
Date Wed, 03 Oct 2007 11:30:05 GMT
Do you get the same using AMQ store (the default in 5.0) - its the  
prefered store over kaha in ActiveMQ 5.0



cheers,

Rob

http://rajdavies.blogspot.com/



On Oct 3, 2007, at 8:50 AM, David Sitsky wrote:

> I have discovered an issue with the latest activemq 5.0 (revision  
> 581510) which seems to have been present for some time, at least  
> for the last month.
>
> I have an application using transactions, and kaha persistence, and  
> two consumers feeding off a queue.
>
> I sometimes see the same message being sent to two consumers.  All  
> transactions were committed (no rollbacks), and as you can see by  
> the debug dump, the message has the same message-ID, but was  
> delivered to two separate consumers, running on separate threads,  
> using sync receives with a prefetch of 0, with separate sessions of  
> course.
>
> Is this a known problem?  It doesn't always happen - seems to be a  
> race condition.  If I turn off persistence, I don't seem to see it.
>
> Here is the message being delivered to consumer 1:
>
> 2007-10-03 17:21:37,310 [Worker 060bacd87f4a40a4867113e2e3e553dd]  
> 85475 DEBUG org.apache.activemq.ActiveMQMessageConsumer -  
> ID:tamarama-62436-1191396093006-2:2:3:2 received message:  
> MessageDispatch {commandId = 0, responseRequired = false,  
> consumerId = ID:tamarama-62436-1191396093006-2:2:3:2, destination =  
> queue://worker-items, message = ActiveMQObjectMessage {commandId =  
> 50, responseRequired = false, messageId =  
> ID:tamarama-62436-1191396093006-2:2:1:3:1, originalDestination =  
> null, originalTransactionId = null, producerId =  
> ID:tamarama-62436-1191396093006-2:2:1:3, destination = queue:// 
> worker-items, transactionId =  
> TX:ID:tamarama-62436-1191396093006-2:2:5, expiration = 0, timestamp  
> = 1191396097286, arrival = 0, brokerInTime = 1191396097290,  
> brokerOutTime = 1191396097303, correlationId = null, replyTo =  
> null, persistent = true, type = null, priority = 4, groupID = null,  
> groupSequence = 0, targetConsumerId = null, compressed = false,  
> userID = null, content =  
> org.apache.activemq.util.ByteSequence@fa8cbc, marshalledProperties  
> = null, dataStructure = null, redeliveryCounter = 0, size = 0,  
> properties = null, readOnlyProperties = true, readOnlyBody = true,  
> droppable = false}, redeliveryCounter = 0}
>
> Here is the same message (check the message ID) being delivered to  
> consumer 2:
>
> 2007-10-03 17:21:37,422 [Worker 2c3169d1726b4781a423a239f65c7bd1]  
> 85587 DEBUG org.apache.activemq.ActiveMQMessageConsumer -  
> ID:tamarama-62436-1191396093006-2:2:1:2 received message:  
> MessageDispatch {commandId = 0, responseRequired = false,  
> consumerId = ID:tamarama-62436-1191396093006-2:2:1:2, destination =  
> queue://worker-items, message = ActiveMQObjectMessage {commandId =  
> 50, responseRequired = false, messageId =  
> ID:tamarama-62436-1191396093006-2:2:1:3:1, originalDestination =  
> null, originalTransactionId = null, producerId =  
> ID:tamarama-62436-1191396093006-2:2:1:3, destination = queue:// 
> worker-items, transactionId =  
> TX:ID:tamarama-62436-1191396093006-2:2:5, expiration = 0, timestamp  
> = 1191396097286, arrival = 0, brokerInTime = 1191396097290,  
> brokerOutTime = 1191396097417, correlationId = null, replyTo =  
> null, persistent = true, type = null, priority = 4, groupID = null,  
> groupSequence = 0, targetConsumerId = null, compressed = false,  
> userID = null, content =  
> org.apache.activemq.util.ByteSequence@1a881cc, marshalledProperties  
> = null, dataStructure = null, redeliveryCounter = 0, size = 0,  
> properties = null, readOnlyProperties = true, readOnlyBody = true,  
> droppable = false}, redeliveryCounter = 0}
>
> I'll need to do more investigations tomorrow, but if anybody has  
> any ideas, I'd appreciate some insights.
>
> -- 
> Cheers,
> David
>
> Nuix Pty Ltd
> Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280  
> 0699
> Web: http://www.nuix.com                            Fax: +61 2 9212  
> 6902


Mime
View raw message