[ 
https://issues.apache.org/jira/browse/PROTON-1523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433709#comment-16433709
 ] 

ASF subversion and git services commented on PROTON-1523:
---------------------------------------------------------

Commit d58bd7154558a3be3a68dfee71f08c7d76bad958 in qpid-proton's branch 
refs/heads/master from [~gemmellr]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=d58bd71 ]

PROTON-636, PROTON-1809, PROTON-1523: update session capacity api doc to 
clarify its behaviour


> [proton c] API unclear how incoming_capacity and max_frame work
> ---------------------------------------------------------------
>
>                 Key: PROTON-1523
>                 URL: https://issues.apache.org/jira/browse/PROTON-1523
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.17.0
>            Reporter: Chuck Rolke
>            Priority: Major
>
> Two settings are available to throttle incoming traffic. These operate in 
> units of bytes:
> * pn_transport_set_max_frame
> * pn_session_set_incoming_capacity
> Suppose a user sets a max_frame to 1 Mbyte and incoming_capacity to 2 Mbytes. 
> How many 200-byte hello-world messages might a user expect to be able to 
> receive before the local incoming-window closes? 10,000? The answer turns out 
> to be 2.
> The logical disconnect is that the user interface incoming_capacity operates 
> in bytes but the AMQP protocol over the wire operates with an Incoming-Window 
> in frames. In the user's case the API assumes full frames and sets  
> Incoming-Window = (incoming_capacity / max_frame), or 2. When the sending 
> peer sends 200-byte messages the actual incoming capacity is 400 bytes and 
> not 2Mbytes.
> The rules (AFAICT) are:
> {noformat}
>   IF (max_size is specified)
>     incoming_window = incoming_capacity / max_size
>   ELSE
>     incoming_window = 2147473647
>   ENDIF
> {noformat}
> Noting:
> * Incoming capacity is achieved only if the peer sends max_size frames.
> * If max_frame is not set then the incoming_capacity setting is ignored.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to