Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 28649 invoked from network); 5 Oct 2007 19:10:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Oct 2007 19:10:34 -0000 Received: (qmail 46819 invoked by uid 500); 5 Oct 2007 19:10:23 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 46769 invoked by uid 500); 5 Oct 2007 19:10:23 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 46760 invoked by uid 99); 5 Oct 2007 19:10:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 12:10:23 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of email.wtam@gmail.com designates 64.233.162.235 as permitted sender) Received: from [64.233.162.235] (HELO nz-out-0506.google.com) (64.233.162.235) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 19:10:25 +0000 Received: by nz-out-0506.google.com with SMTP id z3so458389nzf for ; Fri, 05 Oct 2007 12:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=MesPMfke2HxbG9xuFtVQdB92oMc1KHZCdprNogP2Mgc=; b=kLe68LlZdjRh+0wmYUC5Eed6Y6wIU4Ttzc18Bkx1fBNcr5nWaWnJhe02B3BR1LJ4MqHBE+HQi83LgwzkLvuxGtqn6YdO3mTW0S+FWj09yn6pLGVm3w5WYl99Ya33EuFw0juHkS9QDoTmEG0F182TEO6RsokkoRk/6Ce2mISfotM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sg/rIT5SSvljNqguAyz4pOr5FeXm6o0k3/dznLBj6Tay8WQHTPAgkXw4jcyC6d6xwBWKyb8H50S4/4I3pNNWq6R+v5Qx2LsrhoSbTJ4Z13ilpLPxPxnDVXtpkzTYcEB6p2sx8/XeJDeedyubafpQC1uVvgPA+96rlYmMkHgZoUM= Received: by 10.64.250.7 with SMTP id x7mr19217092qbh.1191611403366; Fri, 05 Oct 2007 12:10:03 -0700 (PDT) Received: by 10.65.203.9 with HTTP; Fri, 5 Oct 2007 12:10:03 -0700 (PDT) Message-ID: Date: Fri, 5 Oct 2007 15:10:03 -0400 From: "William Tam" To: camel-dev@activemq.apache.org Subject: Re: a few comments on SedaComponent In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org On 10/4/07, Hiram Chirino wrote: > On 10/4/07, William Tam wrote: > > 1. In SedaEndpoint.process(Exchange exchange, AsyncCallback callback) > > method. I wouldn't expect callback.done() to be invoked immediately > > when an exchange is enqueued. (right?) But rather I would expect > > callbacks are enqueued with the exchanges so that when the > > SedaConsumer can invoke them after their corresponding exchanges are > > processed. > > I don't agree. I think seda should behave like a jms queue.. The > producer is done when the message gets enqueued. If what you are > trying to do is to do async processing of a pipeline, you should use > the thread processor, like: > from(x).thread(5).to(y) > How about if I want to have a seda rather than just a thread pool? I want to have a bunch of stages. Each stage is a queue backed by a thread pool and some processing. So, I might have something like: from("seda:stage1").thread(pool).process(...).to("seda:stage2"), and so forth If I make a async-send to seda:stage1, my callback is called when my exchange has been enqueued to stage1. IMO, this notification is not very useful. Actually, I think there is no point in making an async call at all. since I know my exchange has been enqueued when the send call returns (in either sync or async). But if my callback is invoked after my exchange has been processed by the seda consumer of seda:stage1, I am notified when stage one is finished which gives me a reason to do async send. If I want to be notified this way, can it be done with pipeline or something else? BTW, I think if the callback passes me the processed exchange, there would be super nice. I probably care more about out message (if any) than whether it has been done synchronously or not.