Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 36110 invoked from network); 4 May 2010 21:24:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 May 2010 21:24:58 -0000 Received: (qmail 2052 invoked by uid 500); 4 May 2010 21:24:58 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 1994 invoked by uid 500); 4 May 2010 21:24:58 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 1986 invoked by uid 99); 4 May 2010 21:24:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 21:24:57 +0000 X-ASF-Spam-Status: No, hits=-1248.7 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 21:24:56 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o44LOaAX016445 for ; Tue, 4 May 2010 21:24:36 GMT Message-ID: <15814453.101273008275927.JavaMail.jira@thor> Date: Tue, 4 May 2010 17:24:35 -0400 (EDT) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQNET-248) Duplicate MessageID received. In-Reply-To: <10159503.3271272055403237.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQNET-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish resolved AMQNET-248. --------------------------------- Resolution: Fixed Resolved in Trunk. > Duplicate MessageID received. > ----------------------------- > > Key: AMQNET-248 > URL: https://issues.apache.org/activemq/browse/AMQNET-248 > Project: ActiveMQ .Net > Issue Type: Bug > Components: Stomp > Affects Versions: 1.2.0 > Environment: ActiveMQ.NMS 1.2.0 Stomp Protocol > Windows Mobile 5.x > Compact Framework 3.5 > Reporter: Steve Higgins > Assignee: Timothy Bish > Fix For: 1.3.0 > > > There is a bug which causes duplicate MessageIDs to be received. Note, the Message IDs are duplicated not the actual messages. This happens if a producer sends several messages to the same queue over the same session. > Note 1: In MessageID.cs SetValue(string messageKey) the producerSequenceId is stripped from the original unique key when a message is received. > {code} > public void SetValue(string messageKey) > { > this.key = messageKey; > // Parse off the sequenceId > int p = messageKey.LastIndexOf(":"); > if(p >= 0) > { > producerSequenceId = Int64.Parse(messageKey.Substring(p + 1)); > messageKey = messageKey.Substring(0, p); > } > producerId = new ProducerId(messageKey); > } > {code} > Note 2: In the Message.cs NMSMessageId get method the unique Id is reconstructed without the sequence id. Because the sequence id is part of what makes the message id itself unique, multiple received messages will now have the same id. > {code} > public string NMSMessageId > { > get > { > if(null != MessageId) > { > return MessageId.ProducerId.ConnectionId + ":" + > MessageId.ProducerId.SessionId + ":" + > MessageId.ProducerId.Value; > } > return String.Empty; > } > {code} > Suggested Fix: The sequenceID should be added back to the MessageId in the above get method unless I am not seeing other potential problems. > Better Approach: As a side note, with this approach NMS can't be used with any other message queue because the current implementation would force the other queues to construct their unique message ids the same exact way. In bound messages should be void of any message id formatting. > Steve -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.