[
https://issues.apache.org/jira/browse/PROTON-1512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16190205#comment-16190205
]
ASF subversion and git services commented on PROTON-1512:
---------------------------------------------------------
Commit b36b70c2ab9ce19b7d56b2e6c9ca9b2383e369bf in qpid-proton's branch
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=b36b70c ]
PROTON-1512: aborted messages: handle credit and empty messages.
The AMQP spec says: "The delivery-count is initialized by the sender when a link
endpoint is created, and is incremented whenever a message is sent."
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#doc-flow-control
We interpret this to mean when the *first* frame of a message is sent/received,
so if any frames of an aborted message are sent, it consumes a credit and
increases the delivery count exactly like a successful message.
However: if a proton sender calls pn_delivery_abort() *before* any frames have
been sent, the delivery is dropped locally, no frames sent, no link-state
updates. This means pn_delivery_abort() will either cancel a local,
partially-constructed message with no side effects, or send an aborted=true
frame as required. Proton will never send a message consisting of a single
aborted frame.
A proton receiver will handle a message consisting of a single aborted frame
correctly - i.e. do credit calculations but consider the delivery aborted.
> Expose the "aborted" flag for transferred deliveries
> ----------------------------------------------------
>
> Key: PROTON-1512
> URL: https://issues.apache.org/jira/browse/PROTON-1512
> Project: Qpid Proton
> Issue Type: New Feature
> Components: proton-c
> Reporter: Ted Ross
> Assignee: Alan Conway
> Labels: api
> Fix For: proton-c-0.18.0
>
>
> As we develop support for message streaming in Qpid Dispatch Router (i.e.
> frames for large multi-frame messages are forwarded to destinations as they
> arrive, before the complete message is received), there is a need to handle
> the case where a received message is never completed.
> The AMQP protocol has a provision for this in the "aborted" flag in the
> transfer performative. If the router is in the process of streaming a large
> message from sender to receiver and the sender drops before completing the
> delivery, the router can send a transfer to the downstream receivers with the
> "aborted" flag set. This would indicate that the message should not be
> processed and would not cause any framing errors on the link.
> Proton does not currently expose this capability in its API (There is a
> pn_link_abort in the C header file, but it is commented out and not
> implemented).
> In order to properly handle the failure cases for message streaming, this
> feature must be usable in Proton.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]