[ 
https://issues.apache.org/jira/browse/PROTON-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867694#comment-13867694
 ] 

Rafael H. Schloming commented on PROTON-484:
--------------------------------------------

Ah, I understand now, thanks for explaining!

An immediate workaround for current and previous releases would be as follows 
on the receiver: set the incoming window to a positive number and explicitly 
call accept/reject for each incoming message, e.g.:

pn_messenger_set_incoming_window(messenger, N); // any number greater than 0 
will work depending on how many messages you would like to be able to process 
at once
// ...
pn_messenger_get(messenger, msg1);
// ...
pn_messenger_get(messenger, msg2); // retrieve up to N messages
// process the messages
pn_tracker_t tracker = pn_messenger_incoming_tracker(messenger); // grab the 
tracker for the most recent incoming message
pn_messenger_accept(messenger, tracker, PN_CUMULATIVE); // accept all incoming 
messages
// you could also do a pn_messenger_reject(...) here or reject individual 
messages and accept the rest, etc.

The above usage pattern will ensure that messenger always puts an explicit 
accept or reject in the disposition frame. For the next release I will make 
sure that messenger sets up the default outcome properly so that the default 
behaviour is more intuitive.

> Disposition Frane: Missing DeliveryState, no default outcome
> ------------------------------------------------------------
>
>                 Key: PROTON-484
>                 URL: https://issues.apache.org/jira/browse/PROTON-484
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: 0.5
>            Reporter: Andreas Mueller
>
> If a message is delivered from a broker to Proton-C by a transfer frame with 
> settled=false, Proton sends a disposition frame with settled=true but without 
> a delivery state. A delivery state is required because a message can be e.g. 
> accepted or rejected through a disposition frame. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to