Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
qpid-cpp-0.34
-
None
Description
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 the following results in the payload sent by the client changing to an 'amqp-value' body section containing a utf8 string:
Message msg; msg.setContentObject("Hello World!"); msg.getContentObject().setEncoding("utf8"); sender.send(msg);
The latter is probably more in line with expectation of sending a string, and less likely to confuse when interoperating with other clients, and the other examples already do this for string content so the hellow world example should be updated to match.