Hello, I have some problems when reading a cms::BytesMessage.
first of all, my client code looks like: void MyMessageListener::onMessage( const Message* message ) { const BytesMessage* b = dynamic_cast<const BytesMessage*>( message ); if (b != NULL) { std::size_t len = b->getBodyLength(); // this line compiles and works. int i = b->readInt(); // this compiles but gives me an exception. // message is in write-only mode .... // then i tried to execute the following line to set the input stream to read-only b->reset(); // this line does not compile. // VC++ 2008 express edition compiler says: // error C2662: 'cms::BytesMessage::reset' : cannot convert 'this' pointer from 'const // cms::BytesMessage' to 'cms::BytesMessage &' } } i found the following issue: https://issues.apache.org/activemq/browse/AMQCPP-143 but it talks only about readXXX methods. not about reset method. could anyone give me any advice to resolve this problem? thank a lot for all your replies. Kind Regards, Eduardo