qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Robie <jonathan.ro...@redhat.com>
Subject Re: Send data row as message using Qpid client
Date Mon, 03 May 2010 21:11:59 GMT
On 05/03/2010 05:06 PM, Steve Olson wrote:
> Thanks for the quick reply. I'll check out the link.
> Am programming in C/C++.

OK, in C++ you use a Variant::Map - a sender adds map entries, then 
encodes it into a message. A receiver decodes the message content into a 
map, where it can be read by the application:

  // Sender

  Variant::Map content;
  content["id"] = 987654321;
  content["name"] = "Widget";
  content["probability"] = 0.43;
  Variant::List colours;
  content["colours"] = colours;
  content["uuid"] = Uuid(true);

  Message message;
  encode(content, message);


  // Receiver

  Variant::Map content;
  decode(receiver.fetch(), content)

Hope this helps!


Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message