qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: How to test Qpid c++ broker ?
Date Fri, 23 Aug 2013 14:38:16 GMT
On 08/23/2013 02:08 PM, kevency_poche wrote:
> thank you very much Gordon.
>
>> For AMQP 0-10 you can set the content-type to 'text/plain' to indicate
>> that it is textual data, and of course you could set that to some other
>> mime-type to indicate some other binary form (e.g. image/jpeg or whatever).
>
>> In future there will be an extension to the API (already on trunk, but
>> won't be released until 0.26), that lets you set the content as an
>> object (a qpid::types::Variant). That allows the std::string to be
>> associated with an encoding (utf8, ascii or binary), as well as allowing
>> it to be a map, list, uuid or one of various numeric types.
>
> So, that means the next release (0.26, which is in trunk )already included
> that sending/receiving the mime type data ??

Good question. For maps and lists, yes it does (amqp/map and amqp/list 
respectively). It should also be able to set the text/plain (though at 
present it does not[1]), and I'll add that straight away. Note that this 
will be the case only for AMQP 0-10.

In AMQP 1.0 setting the content-type is discouraged where the content is 
an AMqpValue section which is how the content 'object' if set will be 
encoded. You can still send the data as raw bytes with an explicit 
content type, but to do so you would have to encode it yourself first 
(at present).

Note also that the c++ broker will translate between the different 
encodings. (And in this case a utf8 typed AmqpValue will on conversion 
to an 0-10 message have text/plain set as the content type).

[1] https://issues.apache.org/jira/browse/QPID-5090

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


Mime
View raw message