You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ken Giusti (JIRA)" <ji...@apache.org> on 2015/03/09 17:41:38 UTC

[jira] [Commented] (QPID-6307) Link starvation may occur when multiple links within a connection consume from the same queue

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

Ken Giusti commented on QPID-6307:
----------------------------------

I've spent some time working on this and have a better understanding of the broker's behaviour.   I suspect 'fixing' this particular problem will require a non-trivial refactor of the existing broker code.  Details:

In order to guarantee that all competing consuming links for a given node (queue) are equally treated, the broker would have to service links in a round-robin fashion on a per-node basis.

The current broker implementation does not do this, as it doesn't group consuming links per their source node.

The current implementation simply walks the connection's sessions, and for each session services each link in turn.  As such no consideration is given as to how messages are being distributed from any particular node.

A possible refactor would entail keeping the set of nodes for which links are attached in the Connection object.  Each per-node context would track its incoming and outgoing links in ring queues.  Processing a node would entail servicing each of its links in turn, and moving the head of the ring queue.

thoughts?



> Link starvation may occur when multiple links within a connection consume from the same queue
> ---------------------------------------------------------------------------------------------
>
>                 Key: QPID-6307
>                 URL: https://issues.apache.org/jira/browse/QPID-6307
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.30
>            Reporter: Ken Giusti
>             Fix For: 0.31
>
>         Attachments: recv-order.py
>
>
> When multiple links on the same connection are competing for messages on the same queue, if the messages arrive at a slow rate one link will end up consuming all the messages.  
> Messages should be load balanced across all the consuming links within the connection.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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