Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2585

ActiveMQTextMessage.getSize() does not consider size of properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.3.0
    • 5.4.0
    • JMS client
    • None
    • Patch Available

    Description

      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:

          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();
          }
      

      This should perhaps be size += text.length() * 2?

      Attachments

        1. ReasonableTextMessageSize.patch
          5 kB
          Magnus Persson

        Activity

          People

            gtully Gary Tully
            magnus.e.persson Magnus Persson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: