Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 22730 invoked from network); 29 Jan 2010 18:44:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jan 2010 18:44:54 -0000 Received: (qmail 63125 invoked by uid 500); 29 Jan 2010 18:44:53 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 63017 invoked by uid 500); 29 Jan 2010 18:44:53 -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 62995 invoked by uid 99); 29 Jan 2010 18:44:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jan 2010 18:44:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jan 2010 18:44:52 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9A53A29A001A for ; Fri, 29 Jan 2010 10:44:32 -0800 (PST) Message-ID: <245632943.6241264790672630.JavaMail.jira@brutus.apache.org> Date: Fri, 29 Jan 2010 18:44:32 +0000 (UTC) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQ-2585) ActiveMQTextMessage.getSize() does not consider size of properties In-Reply-To: <1402312490.4481264687292758.JavaMail.jira@brutus.apache.org> 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/AMQ-2585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully resolved AMQ-2585. ----------------------------- Resolution: Fixed Fix Version/s: 5.4.0 Assignee: Gary Tully thanks for the test case. I made some mods as the override of min message size is only relevant to the broker. The size is calculated on demand for consumers. committed in r904585 > ActiveMQTextMessage.getSize() does not consider size of properties > ------------------------------------------------------------------ > > Key: AMQ-2585 > URL: https://issues.apache.org/activemq/browse/AMQ-2585 > Project: ActiveMQ > Issue Type: Bug > Components: JMS client > Affects Versions: 5.3.0 > Reporter: Magnus Persson > Assignee: Gary Tully > Priority: Minor > Fix For: 5.4.0 > > Attachments: ReasonableTextMessageSize.patch > > > Checking the size of a text message only considers the body of a message, not the properties. I think this relates to a typo in the method: > {noformat} > public int getSize() { > if (size == 0 && content == null && text != null) { > size = getMinimumMessageSize(); > if (marshalledProperties != null) { > size += marshalledProperties.getLength(); > } > size = text.length() * 2; > } > return super.getSize(); > } > {noformat} > This should perhaps be size += text.length() * 2? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.