qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robbie Gemmell (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (QPID-6665) update hello_world.cpp example to use setContentObject
Date Wed, 29 Jul 2015 09:53:04 GMT

     [ https://issues.apache.org/jira/browse/QPID-6665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robbie Gemmell resolved QPID-6665.
----------------------------------
    Resolution: Fixed

> update hello_world.cpp example to use setContentObject
> ------------------------------------------------------
>
>                 Key: QPID-6665
>                 URL: https://issues.apache.org/jira/browse/QPID-6665
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Client, Qpid Examples
>    Affects Versions: qpid-cpp-0.34
>            Reporter: Robbie Gemmell
>            Assignee: Robbie Gemmell
>            Priority: Trivial
>             Fix For: qpid-cpp-next
>
>
> 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:
> {noformat}
>     Message msg;
>     msg.setContentObject("Hello World!");
>     msg.getContentObject().setEncoding("utf8");
>     sender.send(msg);
> {noformat}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message