astitcher commented on PR #442:
URL: https://github.com/apache/qpid-proton/pull/442#issuecomment-3618586963

   I've spent today carefully considering the behaviour of the code and API 
design with respect to message settlement and disposition under various 
conditions and I've concluded that the API and implentation currently does not 
offer the required support for a transactioned API.
   
   Specifically:
   Most importantly: In the case that the broker fails a commit the C++ code 
has no way to know for sure which messages are concerned - either because they 
are now released back to the client in the case of a sent message or because 
the disposition update sent for them by the client is now undone. In either 
case the client has to do work unrolling or redoing work.
   - I think to make this easier we need a separate commit failed callback 
whilst still keeping the existing transaction failed callback
   
   Settlements aren't handled correctly - the basic reason you'd want 
transactions in the first place implies that you need to delay settlement until 
after transaction commit, but our code does not do this - it doesn't even 
acknowledge you'd want to do this. 
   -  The practical way to achieve this would be to only allow a transactioned 
session to contain transactioned messages and then to settle every message in 
the session after a successful commit. The simplest way to do this in this API 
is to fail to transition to a transacted session if there are any unsettled 
messages on the session -- I think we need to implement this.
   - This also means that for transaction controlled messages/disposition 
updates we should not support immediate settlement but always defer until 
transaction discharge, but then in the happy path the API needs to handle the 
settlements itself.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to