You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by Andreas Mueller <am...@iit.de> on 2014/01/09 17:12:01 UTC

Proton-C: How to set application properties?

Hi,

I don't find a way to set the application properties of a message in Proton-C. Can someone give me a hint?

Is there something like a user guide or getting started docs about Messenger?

Thanks,
Andreas
-- 
Andreas Mueller
IIT Software GmbH, Bremen/Germany
http://www.swiftmq.com





IIT Software GmbH
Fahrenheitstr. 13, D28359 Bremen, Germany
Tel: +49 421 330 46 088, Fax: +49 421 330 46 090
Amtsgericht Bremen, HRB 18624, Geschaeftsfuehrer: Andreas Mueller
Steuernummer: 460/118/06404 VAT: DE199945912


Re: Proton-C: How to set application properties?

Posted by Andreas Mueller <am...@iit.de>.
Am 09.01.2014 um 21:15 schrieb Rafael Schloming <rh...@alum.mit.edu>:

> What we have is currently available here:
> 
>  http://qpid.apache.org/components/messenger/index.html
> 
> It is probably a bit more developed for the python binding than for the C
> API itself. Certainly accessing/manipulating data is properly
> under-documented in C as all of that is done automatically in the python
> binding and so requires much less documentation. Let me know if there are
> particular parts you'd like to see filled out and I'll see about improving
> them.

What would really helpful is a one-page user guide where you explain the Messenger API. I want to know e.g. how to use the different QoS exactly-once, at-most-once, at-least-once and all that stuff I can do with that API without jumping from one header file to another. Provide basic samples with snippets in the different supported language bindings.

I think Messenger API is quite comparable with SwiftMQ's AMQP 1.0 Client. This is how our client is documented:

http://www.swiftmq.com/products/router/swiftlets/sys_amqp/client/index.html

That's it. Doesn't took much effort to create it.

Proton is *the* standard AMQP 1.0 driver. It would be a shame if users went frustrated away from it like one of our customers who is now using the Rabbit C 0.9.1 client with SwiftMQ.

-- 
Andreas Mueller
IIT Software GmbH, Bremen/Germany
http://www.swiftmq.com





IIT Software GmbH
Fahrenheitstr. 13, D28359 Bremen, Germany
Tel: +49 421 330 46 088, Fax: +49 421 330 46 090
Amtsgericht Bremen, HRB 18624, Geschaeftsfuehrer: Andreas Mueller
Steuernummer: 460/118/06404 VAT: DE199945912


Re: Proton-C: How to set application properties?

Posted by Rafael Schloming <rh...@alum.mit.edu>.
On Thu, Jan 9, 2014 at 11:12 AM, Andreas Mueller <am...@iit.de> wrote:

> Hi,
>
> I don't find a way to set the application properties of a message in
> Proton-C. Can someone give me a hint?
>

You should be able to access the application properties like this:

pn_data_t *properties = pn_message_properties(message);

You can then use the data API to access/modify the values, e.g.:

pn_data_put_map(properties);
pn_data_enter(properties);
pn_data_put_string(properties, ...); // key 1
pn_data_put_xxx(properties, ...);  // value 1
pn_data_put_string(properties, ...); // key 2
pn_data_put_yyy(properties, ...); // value 2
pn_data_exit(properties);


>
> Is there something like a user guide or getting started docs about
> Messenger?
>

What we have is currently available here:

  http://qpid.apache.org/components/messenger/index.html

It is probably a bit more developed for the python binding than for the C
API itself. Certainly accessing/manipulating data is properly
under-documented in C as all of that is done automatically in the python
binding and so requires much less documentation. Let me know if there are
particular parts you'd like to see filled out and I'll see about improving
them.

--Rafael