activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-2585) ActiveMQTextMessage.getSize() does not consider size of properties
Date Fri, 29 Jan 2010 18:46:34 GMT

    [ https://issues.apache.org/activemq/browse/AMQ-2585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57265#action_57265
] 

Gary Tully commented on AMQ-2585:
---------------------------------

one more thing, just for completeness, the properties were not marshaled by default with the
vm transport so they did not appear in the size calculation. adding marshall=true to the vm
url ensured they were part of the calculation.

> 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.


Mime
View raw message