Alan Conway updated PROTON-1067:
    Attachment: recv.py

Attached reporducer. Run with PN_TRACE_FRM=1 against a broker that respects the 
client's setting for snd-settle-mode e.g. qpidd C++ broker or the proton 
example go broker:

> cd ~/proton/examples/go/electron/ && go run broker.go -debug&
> go run send.go /test 
> PN_TRACE_FRM=1 python /tmp/recv.py

 You can see that the receiver requests snd-settle-mode=1 (pre-settled)

Note that the example python broker hides the problem by ignoring the clients 
requested snd-settle-mode, forcing it to 2 (mixed) and sending unsettled 

> python messenger: cannot acknowledge messages, messenger forces auto-ack or 
> pre-settled.
> ----------------------------------------------------------------------------------------
>                 Key: PROTON-1067
>                 URL: https://issues.apache.org/jira/browse/PROTON-1067
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>    Affects Versions: 0.11
>            Reporter: Alan Conway
>         Attachments: recv.py
> In order to manually acknowledge received messages messenger requires you to:
> 1. set "incoming_window" > 0, otherwise messenger auto-settles all messages.
> 2. set "snd_settled_mode" to SND_UNSETTLED so that the remote end does not 
> pre-settle messages.
> However the python binding (and I think all the bindings) for messenger do 
> not allow you to call  pn_messenger_set_snd_settled_mode, which defaults to 
> SND_SETTLED. Thus it is impossible to manually accept messages because either 
> (with incoming_window==0) messenger auto-settles them or (with 
> incoming_window > 0) messenger's subscribe requests SND_SETTLED on the 
> incoming link so the other end sends pre-settled messages.

This message was sent by Atlassian JIRA

Reply via email to