From users-return-50681-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Fri Nov 9 13:26:30 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7C2E2180627 for ; Fri, 9 Nov 2018 13:26:29 +0100 (CET) Received: (qmail 6490 invoked by uid 500); 9 Nov 2018 12:26:28 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 6459 invoked by uid 99); 9 Nov 2018 12:26:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2018 12:26:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 575EBCA64E for ; Fri, 9 Nov 2018 12:26:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 5.004 X-Spam-Level: ***** X-Spam-Status: No, score=5.004 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, NML_ADSP_CUSTOM_MED=1.2, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URI_HEX=1.313, URI_TRY_3LD=0.519] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id txDldbFDeGjn for ; Fri, 9 Nov 2018 12:26:26 +0000 (UTC) Received: from n4.nabble.com (n4.nabble.com [199.38.86.66]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2A28362344 for ; Fri, 9 Nov 2018 12:26:26 +0000 (UTC) Received: from n4.nabble.com (localhost [127.0.0.1]) by n4.nabble.com (Postfix) with ESMTP id D92A82D69498 for ; Fri, 9 Nov 2018 06:26:25 -0600 (CST) Date: Fri, 9 Nov 2018 06:26:25 -0600 (CST) From: angeloslenis To: users@activemq.apache.org Message-ID: <1541766385887-0.post@n4.nabble.com> In-Reply-To: References: <1541601144246-0.post@n4.nabble.com> Subject: Re: Consume rate drops dracstically with message process latency, even with many consumers per queue. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit That was my initial thought also, so we had already set prefetch limit = 1, which i think is the lowest allowed value, to run our tests: ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy(); prefetchPolicy.setAll(1); connectionFactory.setPrefetchPolicy(prefetchPolicy); With a value of '0' we get the following error: javax.jms.JMSException: Illegal prefetch size of zero. This setting is not supported for asynchronous consumers please set a value of at least 1. My understanding is that different consumer sessions are not running on different threads. I added a debug log in the "onConsume" function of each consumer to validate: onConsume(Message message) { logger.info(Thread.currentThread().getName()) } which prints the following unique entries: ActiveMQ Session Task-1 ActiveMQ Session Task-2 .... ActiveMQ Session Task-100 As i understand, even though i have created 1200 consumer sessions there are only 100 threads running. What do you think? -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html