qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: QPid 0.28 amqp1.0 Java vs C++ client
Date Mon, 12 Jan 2015 21:56:34 GMT
On 01/08/2015 03:06 PM, Gordon Sim wrote:
> On 01/08/2015 02:56 PM, Hamid.Shahid wrote:
>> Thanks Gordon,
>> But is it better to use /message.setContent(msgString)/ or to use
>> /message.setContentObject(msgString)/?
> Use Message::setContentObject(). If you use setContent() the data will
> be sent as a sequence of bytes rather than a utf8 string.
> (In AMQP 0-10, content was always bytes, and you indicated the way those
> bytes should be interpreted using a MIME type in setContentType(). In
> AMQP 1.0, this approach is still possible, but the recommended approach
> I believe is to use the AMQP typesystem to encode the content, which is
> why the setContentObject() method was needed).

One clarification here: to send as utf8 you currently also need to set 
the encoding of the content object. E.g.

   Message m;

I'd like to eliminate the need for that, but at present it is still 

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message