[
https://issues.apache.org/jira/browse/PROTON-1299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15484743#comment-15484743
]
ASF subversion and git services commented on PROTON-1299:
---------------------------------------------------------
Commit a52c331bf12930a83314bd818df7391ce201400f in qpid-proton's branch
refs/heads/master from Robert Gemmell
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=a52c331 ]
PROTON-1299: update getRemoteCredit() handling to account for the differing
behaviour of senders and receivers
> [proton-j] the Link#getRemoteCredit() method return value isn't suitable for
> sending links
> ------------------------------------------------------------------------------------------
>
> Key: PROTON-1299
> URL: https://issues.apache.org/jira/browse/PROTON-1299
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-j
> Affects Versions: 0.14.0
> Reporter: Robbie Gemmell
> Assignee: Robbie Gemmell
> Fix For: 0.15.0
>
>
> The Link interface has a getRemoteCredit() method for getting a local view of
> the 'effective remote credit' for the link based on current credit and queued
> messages. This has historically returned the value 'credit - queued' for both
> sending and receiving links. That makes no sense for sending links since the
> credit value for them already incorporates the effect of any sent messages
> still buffered in the engine, so subtracting the queued count from this just
> applies the send effect twice if there are actually queued messages, leading
> the value to be misleading.
> The method should probably only have been defined for receiving links (or not
> at all given the queued count is able to be inspected separately), but rather
> than break the API by moving it to the Reciever interface, the implementation
> should just be updated to ensure an appropriate answer is given for sending
> links (by making it the same as calling getCredit()).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]