RE: Acknowledgement for messages sent using Proton-C

2013-04-04 Thread Arun Dsouza
Thanks Rafael!  I'll give it a try.

-Original Message-
From: Rafael Schloming [mailto:r...@alum.mit.edu] 
Sent: Friday, March 29, 2013 7:15 AM
To: proton@qpid.apache.org
Cc: David Ingham; Affan Dar; Xin Chen
Subject: Re: Acknowledgement for messages sent using Proton-C

Hi, sorry for the late reply. You can do this by setting a positive outgoing 
window, e.g. pn_messenger_set_outgoing_window(m, 10) will cause messenger to 
track the status of the last 10 messages sent. It will also cause 
pn_messenger_send(m) to block until the status of outgoing messages is known.

Everytime you call pn_messenger_put(m, msg), a new tracker will be assigned for 
the outgoing message. You can access this tracker by doing tracker =
pn_messenger_outgoing_tracker(m) right after calling put. Once you've called 
pn_messenger_send(m) you can then use this tracker to go back and access the 
status of outgoing messages by checking pn_messenger_status(m, tracker).

Hope this helps. Let me know if anything is unclear.

--Rafael

On Wed, Mar 27, 2013 at 1:54 PM, Arun Dsouza ardso...@microsoft.com wrote:

 While sending messages through a Proton-C client,  is it possible to 
 set the settled flag on the AMQP Transfer frame to false?

 I wish to receive an ACK / NACK from the broker to which I am sending 
 messages, which will let my application know whether the send was 
 successful or not.

 Thanks,
 Arun







Re: Acknowledgement for messages sent using Proton-C

2013-03-29 Thread Rafael Schloming
Hi, sorry for the late reply. You can do this by setting a positive
outgoing window, e.g. pn_messenger_set_outgoing_window(m, 10) will cause
messenger to track the status of the last 10 messages sent. It will also
cause pn_messenger_send(m) to block until the status of outgoing messages
is known.

Everytime you call pn_messenger_put(m, msg), a new tracker will be assigned
for the outgoing message. You can access this tracker by doing tracker =
pn_messenger_outgoing_tracker(m) right after calling put. Once you've
called pn_messenger_send(m) you can then use this tracker to go back and
access the status of outgoing messages by checking pn_messenger_status(m,
tracker).

Hope this helps. Let me know if anything is unclear.

--Rafael

On Wed, Mar 27, 2013 at 1:54 PM, Arun Dsouza ardso...@microsoft.com wrote:

 While sending messages through a Proton-C client,  is it possible to set
 the settled flag on the AMQP Transfer frame to false?

 I wish to receive an ACK / NACK from the broker to which I am sending
 messages, which will let my application know whether the send was
 successful or not.

 Thanks,
 Arun