qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Conway (JIRA)" <j...@apache.org>
Subject [jira] Commented: (QPID-1909) Consumer with byte credit can get ignored if a large message "eclipses" a small one.
Date Mon, 18 Oct 2010 18:56:25 GMT

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

Alan Conway commented on QPID-1909:

It should be possible to use a test just like the one in the description but adding a new
broker to the cluster just after creating the pauper and then consuming from the new broker.

> Consumer with byte credit can get ignored if a large message "eclipses" a small one.
> ------------------------------------------------------------------------------------
>                 Key: QPID-1909
>                 URL: https://issues.apache.org/jira/browse/QPID-1909
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.5
>            Reporter: Alan Conway
>            Assignee: Gordon Sim
>         Attachments: QPID-1909.patch
> Given: A consumer with byte credit  N for a queue with messages Big size > N and Small
size < N
> The consumer should not be able to consume Big. Now remove Big with a different consumer.
> The consumer should now be able to consume Small, but doesn't
> The problem in Queue.cpp is twofold: 
>  - if a consumer returns "false" from accept, it is assumed to be blocked and is removed
from the listener set. It won't be notified of new messages
>  - the queue only notifies when new messages arrive. It does not notify when a blocking
message is removed.
> This is demonstrated by adding the following to test_credit_flow_bytes in message.py:
>          # Check for bug that allowed a small message to be hidden by a larger one. 
>         session.message_transfer(message=Message(session.delivery_properties(routing_key="q"),
>         session.message_transfer(message=Message(session.delivery_properties(routing_key="q"),
>         session.message_flow(unit = session.credit_unit.byte, value = msg_size, destination
= "c")
>         try:
>             q.get(timeout = 1)          # Should fail, message is too big.          
>             self.fail("Expected Empty exception")
>         except Empty: None
>         # Create another consumer to remove the large message                       
>         session.message_subscribe(queue = "q", destination = "c2")
>         session.message_flow(unit = session.credit_unit.byte, value = 0xFFFFFFFFL, destination
= "c2")
>         session.message_flow(unit = session.credit_unit.message, value = 1, destination
= "c2")
>         self.assertDataEquals(session, session.incoming("c2").get(timeout=1), "toobigtoobigtoobigtoobig")
>         # Now the first consumer should be able to receive the smaller message.     
>         self.assertDataEquals(session, q.get(timeout = 1), "abcdefgh")

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

View raw message