[jira] [Commented] (PROTON-484) Disposition Frane: Missing DeliveryState, no default outcome

2014-01-10 Thread Andreas Mueller (JIRA)

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

Andreas Mueller commented on PROTON-484:


This is what you send when attaching a receiver (no default outcome set in the 
source):

[Attach name=receiver-xxx, handle=0, role=TRUE, sndSettleMode=2, 
rcvSettleMode=0, source=[Source address=testqueue, durable=0, 
expiryPolicy=session-end, timeout=0, dynamic=FALSE], target=[Target 
address=testqueue, durable=0, expiryPolicy=session-end, timeout=0, 
dynamic=FALSE], incompleteUnsettled=FALSE, initialDeliveryCount=0]

This is what SwiftMQ sends you back (announcing released as default outcome 
for the source):

[Attach name=receiver-xxx, handle=0, role=FALSE, sndSettleMode=2, 
rcvSettleMode=0, source=[Source address=testqueue, durable=1, 
expiryPolicy=link-detach, timeout=0, dynamic=FALSE, defaultOutcome=[Released ], 
outcomes=[amqp:accepted:list, amqp:rejected:list, amqp:released:list, 
amqp:modified:list]], target=[Target address=testqueue, durable=0, 
expiryPolicy=session-end, timeout=0, dynamic=FALSE], incompleteUnsettled=FALSE, 
initialDeliveryCount=0]

According to your interpretation of the spec, released will be applied if you 
send a dispo frame without an outcome. This is what SwiftMQ does and this 
caused a continuous redelivery of the very same message.

Keep in mind that the default outcome will be applied to all unsettled 
transfers in case the connection drops. If you would set it to accepted this 
may cause message losts.  That's why SwiftMQ's default outcome is always 
released to cause rollback and redelivery. So the correct way for me seems to 
be to include the delivery state in the dispo frame.

I would apply a workaround too but can't just set accepted if the delivery 
state is missed in the dispo frame. I have to use the default outcome.

 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)


[jira] [Commented] (PROTON-484) Disposition Frane: Missing DeliveryState, no default outcome

2014-01-10 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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)


[jira] [Commented] (PROTON-484) Disposition Frane: Missing DeliveryState, no default outcome

2014-01-09 Thread Rafael H. Schloming (JIRA)

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

Rafael H. Schloming commented on PROTON-484:


I believe the sort of disposition frame you're describing is valid. In that 
case I believe the broker should apply the default outcome for the link.

 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)