[prev in list] [next in list] [prev in thread] [next in thread]
List: activemq-dev
Subject: [jira] [Commented] (AMQ-4107) Message order can be broken for Topic under a high load when topicPref
From: "Nikolay Martynov (JIRA)" <jira () apache ! org>
Date: 2014-09-29 17:56:35
Message-ID: JIRA.12611796.1350288555000.146808.1412013395414 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/AMQ-4107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14151958#comment-14151958 \
]
Nikolay Martynov commented on AMQ-4107:
---------------------------------------
Sorry. We have used JMeter based tests for fix proof and don't plan to contribute \
unit tests at the moment.
> Message order can be broken for Topic under a high load when topicPrefetch=1 and \
> comsumer is slow
> -------------------------------------------------------------------------------------------------
>
> Key: AMQ-4107
> URL: https://issues.apache.org/jira/browse/AMQ-4107
> Project: ActiveMQ
> Issue Type: Bug
> Components: Transport
> Affects Versions: 5.6.0
> Reporter: Yuriy Sidelnikov
> Attachments: 4107.diff, ActiveMQ-5.9-AMQ-4107.patch
>
>
> For <amq:policyEntry topic=">" producerFlowControl="true" memoryLimit="30mb" \
> {color:red}topicPrefetch="1"{color} blockedProducerWarningInterval="30"> Short \
> excerpt from TopicSubscription class: public void add(MessageReference node) throws \
> Exception { …..
> if ({color:red}!isFull(){color} && matched.isEmpty() && !isSlave()) {
> // if maximumPendingMessages is set we will only discard messages which
> // have not been dispatched (i.e. we allow the prefetch buffer to be filled)
> {color:red}dispatch(node);{color} <- Second message will go this \
> way and might be dispatched sooner than first one. setSlowConsumer(false);
> } else {
> …….
> if ({color:red}matched.tryAddMessageLast(node, 10)){color} { <- first message \
> will be put in the VMCursor queue and might be dispatched later
> break;
> }
> .....
> {color:red}dispatchMatched();{color} <- First message won't be dispatched \
> immediately because !isFull() is still false }
> Possible scenario as I can see it from logs:
> 1. First message has arrived and !isFull() is false because consumer didn't take \
> some previous message yet. 2. First message will be processed by tryAddMessageLast \
> in VMPendingMessageCursor class and will be dispatched very lately because \
> !isFull() is still false. 3. Meanwhile consumer reads some previous message and \
> !isFull() will return true. 4. Second message will be dispatched immediately \
> and might be first to be delivered. 5. Then first message is dispatched.
> 6. Message order is broken.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic