Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 20861 invoked from network); 23 Apr 2010 22:37:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Apr 2010 22:37:48 -0000 Received: (qmail 66135 invoked by uid 500); 23 Apr 2010 22:37:48 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 66108 invoked by uid 500); 23 Apr 2010 22:37:48 -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 66100 invoked by uid 99); 23 Apr 2010 22:37:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Apr 2010 22:37:48 +0000 X-ASF-Spam-Status: No, hits=-1186.1 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; Fri, 23 Apr 2010 22:37:47 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3NMbQe1014700 for ; Fri, 23 Apr 2010 22:37:26 GMT Message-ID: <4078156.3381272062246287.JavaMail.jira@thor> Date: Fri, 23 Apr 2010 18:37:26 -0400 (EDT) From: "Jim Gomes (JIRA)" To: dev@activemq.apache.org Subject: [jira] Updated: (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 ] Jim Gomes updated AMQNET-248: ----------------------------- Component/s: Stomp (was: NMS) > 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: Jim Gomes > > 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.