Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 97B281798A for ; Fri, 26 Sep 2014 07:41:28 +0000 (UTC) Received: (qmail 13261 invoked by uid 500); 26 Sep 2014 07:41:28 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 13209 invoked by uid 500); 26 Sep 2014 07:41:28 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 13196 invoked by uid 99); 26 Sep 2014 07:41:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Sep 2014 07:41:27 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Sep 2014 07:41:23 +0000 Received: by mail-ie0-f172.google.com with SMTP id rp18so13149678iec.17 for ; Fri, 26 Sep 2014 00:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=t97pxydtCBEieTg1vVUdEMdG3HWy0x2nHRF8L/5u97I=; b=fkz18/TEux8L1FJT959tqxjDU8nj+TRYkaa2CjIgR0KDsQUISbOP27TGjatzUg3lev /Sdevp4xCVvS8NkDPVDN4Se/6yKk9Ii+LqHKRjtuVM5Zs+UmRtl97/hK7Cf/vJY4MVg3 BEI2IOrkgQZfcUXo57FuUg1BX2P/krVuAILY9K95wWkbE+aqsFTEZK+RdACYWlvVsbDW edIfKbNy6uiH7mf6/SVZlFE6qtJfbp/btLYaIgRn/UE4qJPtARvcYHTrJlU17rxyNQwS Z+OeSQ/MDBxyRmvxmKuoQT5vuPKPGUznalHebIHzyT5ZxgJ3lqxLr7cW1+Tr0XxEl0Lp 31FA== X-Received: by 10.50.73.130 with SMTP id l2mr28709078igv.9.1411717263015; Fri, 26 Sep 2014 00:41:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.233.200 with HTTP; Fri, 26 Sep 2014 00:40:42 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Fri, 26 Sep 2014 09:40:42 +0200 Message-ID: Subject: Re: JMS - asyncConsumer & To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Yes the async routing engine requires that threads are not being blocked etc, and not all Camel components / 3rd party libraries can support that. On Fri, Sep 26, 2014 at 3:27 AM, Andrew Thorburn wrote: > I'd be happy to update the docs, though I've haven't signed the agreement > yet. Can I take it that I understand what's going on correctly, regarding > the asyncConsumer option? > > Thanks, > > - Andrew > > On Thu, Sep 25, 2014 at 7:35 PM, Claus Ibsen wrote: > >> Hi >> >> You are welcome to improve the docs, eg add some details about this to >> the asyncConsumer option. >> http://camel.apache.org/jms >> >> Though maybe its best placed be on the async routing engine page, as >> it applies to how it works and under which circumstances. >> http://camel.apache.org/asynchronous-routing-engine.html >> >> And then you can refer to this page from the jms page, for more details. >> >> And lets keep the option name as is, as this is the naming convention >> used by Camel and in the source code as well. >> >> We love contributions >> http://camel.apache.org/contributing.html >> >> And here is how to help edit the docs >> http://camel.apache.org/how-do-i-edit-the-website.html >> >> On Thu, Sep 25, 2014 at 4:07 AM, Andrew Thorburn wrote: >> > Hey guys, >> > >> > Just want to clarify that I understand how this works correctly: >> > >> > Setting the "asyncConsumer" option to "true" on a JMS Consumer does not, >> in >> > and of itself, mean that messages are guaranteed to be processed >> > asynchronously, but it does mean that if an endpoint supports >> asynchronous >> > behaviour, the Camel JMS consumer will allow that. >> > >> > In other words, if you set "asyncConsumer" to "true", but none of your >> > endpoints in your pipeline allow asynchronous processing, it will all get >> > processed synchronously anyway. >> > >> > In that case, you would need to wrap everything you wanted processed >> > asynchronously in a tag (or a threads() call), which would >> allow >> > you to control the number of threads, the queue size, etc. >> > >> > Conversely, even if you provide a wrapper, if asyncConsumer is >> > set to "false", it will get processed synchronously. >> > >> > Is that correct? It appears to be, based on what I can see in the source >> > code (looking at Threads, JMS Configuration, JMS Consumer, >> > EndpointMessageListener, etc). >> > >> > If that's correct, wouldn't it make sense to rename the option >> > asyncConsumer to asyncAllowed (or maybe asyncConsumerAllowed)? >> > asyncConsumer implies, at least to me, that the consumer will somehow >> > magically run everything asynchronously without the need for further >> > configuration, when that does not appear to be true. asyncAllowed is >> closer >> > to what actually happens - in that setting the option does not magically >> > make everything asynchronous, but if you *want* to make it asynchronous >> > yourself, you can. >> > >> > Also, this implies that the example at the bottom of >> > http://camel.apache.org/async.html is, if not wrong, then at least >> missing >> > information, as it does not show that the JMS consumer has had the >> > "asyncConsumer" option set on it anywhere. >> > >> > FWIW, as I'm integrating with WebSphere MQ, and the queue I'm consuming >> > from is set to EXCLUSIVE_OPEN (or something along those lines), I don't >> > believe that I can make any use of the >> > concurrentConsumers/maxConcurrentConsumers options on the JMS endpoint. >> > >> > Thanks, >> > >> > - Andrew Thorburn >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: cibsen@redhat.com >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ >> -- Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/