You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2010/11/01 11:43:29 UTC

[jira] Updated: (QPID-2604) Incorrect logic for handling message credits in BasicMessageConsumer_0_10 could result in the client receiving more messages than it needs.

     [ https://issues.apache.org/jira/browse/QPID-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell updated QPID-2604:
---------------------------------

    Fix Version/s:     (was: 0.7)

> Incorrect logic for handling message credits in BasicMessageConsumer_0_10  could result in the client receiving more messages than it needs.
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-2604
>                 URL: https://issues.apache.org/jira/browse/QPID-2604
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M4, 0.5, 0.6
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>
> In getMessageFromQueue method in BasicMessageConsumer_0_10, 
> If there no messages in the local queue, it will call messageFlush and then sync. 
> This is to ensure we get any messages that are in flight before we return null  if we don't get any.
> However once we do a messageFlush the broker will clear the credits. 
> So we immediately issue more credits. However we are not talking into account any unacked messages, therefore we will issue more credits than intended.
> This can be easily observed when using CLIENT-ACK.
> 1. Send 30 messages to a queue
> 2. Create a consumer on the queue and set prefetch=10
> 3. Consume 10 messages without acking any.
> 4. Try to receive the 11th message, and observe in the logs that the broker has sent 10 more messages bcos of the above error.
> 5.  Continue to receive messages until the 20th without acking.
> 6. Try to receive the 21st message, and observe in the logs that the broker has sent 10 more messages bcos of the above error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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