Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1F24EB52 for ; Mon, 25 Feb 2013 11:21:47 +0000 (UTC) Received: (qmail 24737 invoked by uid 500); 25 Feb 2013 11:21:47 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 24479 invoked by uid 500); 25 Feb 2013 11:21:47 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 24448 invoked by uid 99); 25 Feb 2013 11:21:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 11:21:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bibryam@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-wg0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 11:21:38 +0000 Received: by mail-wg0-f51.google.com with SMTP id 8so2346660wgl.30 for ; Mon, 25 Feb 2013 03:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=A1qURzw9f16BRm5neHOvApbxHPTeYAwX1aJA8bTex+0=; b=S63ojWz16gylvNuNqkzmk3p+2L4JwYbmZl67ANAHnNY9185EmYa1hv/xwa2IWmeJsQ uN0KOT/OS7vJ0IPNZ6ObVQxpzxX37n3LXnXBE0k8I1Gfn6+UKrFaCKfNlW/etngGfFQ1 jCsKk5fElNce9RzIu/pystOP/dqXXm2DBTgkAXVV01Er5SaC7VkwXldzu+uRk/zKeA2s n6hLkLmNd0C6CWozeQ8upimsaHQWtEOrXmt+ur8wENeieBZiBOsS0093HoqZeOummBh2 RA1MYQ9xhbBgE1b1hjFj4TZMjvzsjSLasjr6oMxmYavX58tPzuVBaaoLWKCqmN2MRus/ iaJg== MIME-Version: 1.0 X-Received: by 10.180.79.227 with SMTP id m3mr11309421wix.12.1361791278716; Mon, 25 Feb 2013 03:21:18 -0800 (PST) Received: by 10.216.146.1 with HTTP; Mon, 25 Feb 2013 03:21:18 -0800 (PST) In-Reply-To: References: Date: Mon, 25 Feb 2013 11:21:18 +0000 Message-ID: Subject: Re: Seda component not handing over the completions From: Bilgin Ibryam To: dev@camel.apache.org Content-Type: multipart/alternative; boundary=14dae9cc9f966d204804d68abd5d X-Virus-Checked: Checked by ClamAV on apache.org --14dae9cc9f966d204804d68abd5d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 25 February 2013 10:45, Raul Kripalani wrote: > Well, it's not safe to execute the completions before the Vm consumer has > finished processing, because the InputStream could be closed by the time > the Vm consumer starts processing the exchange. > > I agree with Willem that the current implement is correct. > I see, you both are right here, but what I actually do is exactly your example below: > > The safest option is to convert the body to a String, and either use the > threads DSL or inOnly(vm:...) to modify the exchange pattern onwards. > > I've converted the body to a String, and then send the exchange to vm endpoint using in only patters. At this point I expected to use VM endpoint as an inmemory VM queue for exchanges, but cannot do that, because the completions are also handled to that queue. Do I miss something here? Thanks for your help guys. Bilgin > Ra=FAl. > On 21 Feb 2013 17:13, "Bilgin Ibryam" wrote: > > > Hi, > > > > I have a route where I consume from a file endpoint and put them in VM > > endpoint, so that another camel route from different camel app can > process > > it a little later asynchronously. > > > > The file endpoint has move=3Dprocessed for removing the processed files= , > but > > even the exchanges are delivered to VM endpoint, the exchange is not > > considered completed, so the original file stays locked and cannot > process > > other files before I start the second camel application and process the > > exchanges from VM endpoint. > > > > SEDA has waitForTaskToComplete option, which controls whether the calle= r > > should wait for the async task to complete or not before continuing. Bu= t > > even when waitForTaskToComplete=3DNever is set, the completions are han= ded > > over to VM queue, so it is not possible to complete the exchange. > > > > Is there a way to complete the exchange when it is put in VM queue? Or > > there is a possibility for extending SEDA component with additional > option > > for not handling over the completions when waitForTaskToComplete=3DNeve= r is > > set? > > > > WDYT > > Bilgin > > > --14dae9cc9f966d204804d68abd5d--