You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Gordon Sim (JIRA)" <ji...@apache.org> on 2011/04/28 14:21:03 UTC

[jira] [Commented] (QPID-3232) fetch(timeout=0) does not behave as expected on receiver with capacity=1

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

Gordon Sim commented on QPID-3232:
----------------------------------

In the receivers fetch() implementation, after waiting for draining to complete a call to _grant() is made - I assume to replenish the drained credit. However that call will not actually result in any more credit being issued when made during the first fetch() call in the above example. The returned count has not yet been updated, so granted remains at 1. In the drivers grant() call for the receiver, the delta is computed to be 0 (granted, received and impending are all 1). Only during the second fetch() call, *after* draining, is the _grant() call on the receiver reissued and at that point the returned counter has been updated so a message-flow is triggered - however this happens after the flush and so the fetch() will usually not return it.

> fetch(timeout=0) does not behave as expected on receiver with capacity=1
> ------------------------------------------------------------------------
>
>                 Key: QPID-3232
>                 URL: https://issues.apache.org/jira/browse/QPID-3232
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: 0.10
>            Reporter: Gordon Sim
>             Fix For: 0.11
>
>
> Fill a queue up with some messages (some > 1). Create a receiver with capacity=1. Call fetch() in a loop with timeout=0. 
> Expect to get all the messages that were on the queue to start with. Only get the first message.
> It appears to be a result of the client not restoring its credit correctly after the first flush.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org