qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbie Gemmell <robbie.gemm...@gmail.com>
Subject Re: change hello_world.cpp example to use setContentObject ?
Date Wed, 29 Jul 2015 09:54:03 GMT
On 27 July 2015 at 12:15, Gordon Sim <gsim@redhat.com> wrote:
> On 07/21/2015 05:14 PM, Robbie Gemmell wrote:
>>
>> The hello_world.cpp example for Qpid Messaging C++ currently sends its
>> message by doing "sender.send(Message("Hello world!"));" which causes
>> it to send a data body section containing the bytes, when using AMQP
>> 1.0.
>>
>> Aleternatively, doing this:
>>
>>      Message msg;
>>      msg.setContentObject("Hello World!");
>>      msg.getContentObject().setEncoding("utf8");
>>      sender.send(msg);
>>
>> results in the payload sent by the client changing to an amqp-value
>> body section containing a utf8 string.
>>
>> The other examples appear to use setContentObject already when sending
>> strings. Is there any reaosn not to do the same for the simple hello
>> world example?
>
>
> That would be a sensible change.
>
>

I went to commit the change but see you already did, thanks :)

https://issues.apache.org/jira/browse/QPID-6665

Robbie

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


Mime
View raw message