Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75A56EBD1 for ; Wed, 16 Jan 2013 20:06:13 +0000 (UTC) Received: (qmail 57215 invoked by uid 500); 16 Jan 2013 20:06:13 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 57143 invoked by uid 500); 16 Jan 2013 20:06:13 -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 57099 invoked by uid 99); 16 Jan 2013 20:06:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jan 2013 20:06:13 +0000 Date: Wed, 16 Jan 2013 20:06:12 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQCPP-448) Problem to recive a BytesMessage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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