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 12:44:53 GMT
On 08/23/2013 12:33 PM, kevency_poche wrote:
> i will work on those and get back to you. the spout and drain executables
> are useful to send some text. If i want to send something like images,audio,
> etc. Is it possible using this c++ broker ?
> Excuse me, if this is a silly question .

Not a silly question at all. The fact that the content is set as a 
std::string doesn't imply that it is textual in nature. It is 
essentially just a sequence of bytes. So yes it is certainly possible.

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.

In hindsight the API would likely have been clearer had 
std::vector<uint8_t> been used in place of std::string. That may be an 
addition that gets made at some point also.

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

View raw message