qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbie Gemmell <robbie.gemm...@gmail.com>
Subject change hello_world.cpp example to use setContentObject ?
Date Tue, 21 Jul 2015 16:14:05 GMT
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?

Robbie

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


Mime
View raw message