Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 99987 invoked from network); 20 May 2010 12:56:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 May 2010 12:56:45 -0000 Received: (qmail 12335 invoked by uid 500); 20 May 2010 12:56:45 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 12299 invoked by uid 500); 20 May 2010 12:56:45 -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 12291 invoked by uid 99); 20 May 2010 12:56:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 12:56:45 +0000 X-ASF-Spam-Status: No, hits=-1274.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; Thu, 20 May 2010 12:56:44 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4KCuOSb028011 for ; Thu, 20 May 2010 12:56:24 GMT Message-ID: <8476544.2171274360184492.JavaMail.jira@thor> Date: Thu, 20 May 2010 08:56:24 -0400 (EDT) From: =?UTF-8?Q?Andreas_L=C3=A4ndle_=28JIRA=29?= To: dev@activemq.apache.org Subject: [jira] Commented: (AMQNET-245) Stomp.MessageProducer doesn't set the TimeStamp to zero (unix epoc) if DisableMessageTimestamp is true. In-Reply-To: <108282073.15781268821305455.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQNET-245?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 59474#action_59474 ]=20 Andreas L=C3=A4ndle commented on AMQNET-245: --------------------------------------- Please Note: Since NMS has dependencies between the NMSTimestamp and NMSTim= eToLive properties - Disabling the timestamps on the producer results in co= rrupted expiration dates of the messages! Reproduction: Set the TTL of a message to 1 hour - send this message via a producer which= has DisableMessageTimestamp=3Dtrue. Now take a look at the "expires" field of the transfered message - it's val= ue is all to small (and so the broker would discard the message immediately= ). Workaround: I have worked around this issue with a dirty hack - i just bypass the TTL-T= imespan. var stompMessage =3D nmsMessage as BaseMessage; if (stompMessage !=3D null) { stompMessage.Expiration =3D DateUtils.ToJavaTimeUtc(myExpiratio= nDate); } > Stomp.MessageProducer doesn't set the TimeStamp to zero (unix epoc) if Di= sableMessageTimestamp is true. > -------------------------------------------------------------------------= ------------------------------ > > Key: AMQNET-245 > URL: https://issues.apache.org/activemq/browse/AMQNET-245 > Project: ActiveMQ .Net > Issue Type: Improvement > Components: Stomp > Environment: Win7, VS2008, .netcf-2.0 > Reporter: Andreas L=C3=A4ndle > Assignee: Timothy Bish > Priority: Trivial > Fix For: 1.3.0 > > Attachments: MessageProducer.patch > > > If I interpret the comment on Apache.NMS.IMessage.NMSTimestamp correctly,= the timestamp of a message of send by a message producer with disabled tim= stamping should reflect the unix epoc. This is also what the JMS specificat= ion says in section 3.4.4 (JMSTimestamp). > But since the TimeStamp property of a message is set to DateTime.UtcNow i= n Apache.NMS.Stomp.Commands.Message.ctor() and the Apache.NMS.Stomp.Message= Producer.Send(...) implementation only updates the message timestamp (if me= ssage timestampng isn't disabled for the producer), the timestamp of a mess= age send via STOMP can never be "zero" (=3Dunix epoc). > Maybe a simple solution might be to add an else-branch to the MessageProd= ucer-Send-implementation (see attached patch file), but i don't know if thi= s follows the NMS-projects design intentions. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.