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] [Commented] (QPID-6665) update hello_world.cpp example to use setContentObject
Date Wed, 29 Jul 2015 09:59:04 GMT

    [ https://issues.apache.org/jira/browse/QPID-6665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14645818#comment-14645818

Robbie Gemmell commented on QPID-6665:

Chuck made a related change for the C# binding example for the client:

Date: Tue Jul 28 21:41:52 2015
New Revision: 1693164
URL: http://svn.apache.org/r1693164
Log: NO-JIRA: update hello world example to use recommended api for content manipulation
Mirrors C++ example URL: http://svn.apache.org/r1693139

> 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

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

View raw message