activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQCPP-448) Problem to recive a BytesMessage
Date Wed, 16 Jan 2013 20:06:12 GMT

    [ https://issues.apache.org/jira/browse/AMQCPP-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13555403#comment-13555403
] 

Timothy Bish commented on AMQCPP-448:
-------------------------------------

I did some initial investigation and cannot reproduce this.  I'd suggest you look at the test
case in the source bundle: /activemq-cpp/src/test-integration/activemq/test/SimpleTest.cpp


Try creating a new test case that reproduces your issue.
                
> Problem to recive a BytesMessage 
> ---------------------------------
>
>                 Key: AMQCPP-448
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-448
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Other C++ Clients
>    Affects Versions: 3.5.0
>         Environment: OS: MAC OSX 10.7.5
> IDE: XCODE
>            Reporter: Jorge Omar
>            Assignee: Timothy Bish
>
> I recive the ByteMessage with wrong information, but if i compile the same progrma with
api 3.4.5 it works fine:
> Here the code: 
> const TextMessage* textMessage = dynamic_cast< const TextMessage* >( message );
>             const BytesMessage* bytetMessage = dynamic_cast< const BytesMessage* >(
message );
>             //const StreamMessage* bytetMessage = dynamic_cast< const StreamMessage*
>( message );
>            
>             string text = "";
>             
>             if( textMessage != NULL ) {
>                 text = textMessage->getText();
>                 std::cout << "Message " << count << " Received: " <<
text.c_str() << endl;
>             }
>             else if( bytetMessage != NULL ) {
>                 
>                 int size = bytetMessage->getBodyLength();
>                 
>                 std::cout << "BYTES RECIVIDOS: " << size << endl;
>                 printBytesHex((char*)bytetMessage->getBodyBytes(),size,"BUFFER");
> The probles is:
> BYTES RECIVIDOS: 59768832
> Message Body is Read-Only.
> 	FILE: activemq/commands/ActiveMQBytesMessage.cpp, LINE: 135
> At the moment of read message size it reads 59768832 against 32 bytes of my message that
was sended.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message