activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juho Peltonen (JIRA)" <jira+amq...@apache.org>
Subject [jira] [Created] (AMQNET-555) Reading Content-property from ActiveMQBytesMessages multiple times doesn't work
Date Tue, 02 Aug 2016 06:59:20 GMT
Juho Peltonen created AMQNET-555:
------------------------------------

             Summary: Reading Content-property from ActiveMQBytesMessages multiple times doesn't
work
                 Key: AMQNET-555
                 URL: https://issues.apache.org/jira/browse/AMQNET-555
             Project: ActiveMQ .Net
          Issue Type: Bug
            Reporter: Juho Peltonen
            Assignee: Jim Gomes


Example

{code}
byte[] a = message.Content;
byte[] b = message.Content;
// a.Length == b.Length, but b is just zero bytes
{code}

I assume this is because ActiveMQBytesMessage.Content at /src/main/csharp/Commands/ActiveMQBytesMessage.cs
uses this.dataIn.Read(...), where `this.dataIn` is the same instance every time method is
called for the same message. So only first property get actually reads any values, but the
rest don't read anything; they just initialize the buffer so only the size is correct.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message