I agree, this definitely would be a pain since the onMessage method gives you a const Message. Could you capture this issue in JIRA? http://issues.apache.org/activemq/browse/AMQCPP
Thanks, Nate On 9/21/07, Motl <[EMAIL PROTECTED]> wrote: > > > Hi, > I once asked you why readBytes() and other read methods aren't const: > > http://www.nabble.com/BytesMessage-methods-tf3833767s2354.html#a10853672 > > But if only the stream pointer is updated, I suppose we could have another > solution here, i.e. > declare inputStream field as 'mutable': > > mutable io::ByteArrayInputStream inputStream; > > In that case we could keep read methods const. > > I am requesting for that because at the moment such non-const API forces > app > level either always deal with non-const objects or make > const_cast<cms::BytesMessage *>(), that's not good. > > -- > View this message in context: > http://www.nabble.com/BytesMessage-constness-tf4492790s2354.html#a12813490 > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > >