Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 54869 invoked from network); 13 Oct 2009 11:51:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Oct 2009 11:51:37 -0000 Received: (qmail 53812 invoked by uid 500); 13 Oct 2009 11:51:37 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 53768 invoked by uid 500); 13 Oct 2009 11:51:37 -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 53758 invoked by uid 99); 13 Oct 2009 11:51:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2009 11:51:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.220.223 as permitted sender) Received: from [209.85.220.223] (HELO mail-fx0-f223.google.com) (209.85.220.223) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2009 11:51:25 +0000 Received: by fxm23 with SMTP id 23so8725357fxm.6 for ; Tue, 13 Oct 2009 04:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=okeifEXOQHrnJoS0gGE5+SKHkKXHIKj+NEyzYlYV4Iw=; b=b8DevXqHHe/sIiSF2cl11zwiz7t1BccBoZARKy3f02kxLb5Z9fotSe9rwbtbX5HUDa g8+my2QNRijhRS9ptbp8IHJRowSima1GYS/vqRrlpogOjxNpjmUhM3zQ0Vyvh6bUwc1o BLUPzlVj25K3QxvIgO8oOO5KDpo5jepx6gTM0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=xJ5FLWQ7qWWP9vvxC3GO0mijfaFaljjUXikY5ADE7VL8izbMLOV/YgQhxh/KEH/Cx3 szSOeHbParCMcFuTn0BOssdMJfxAcCb9KFENzsPwcxdGe1d62XcUWFRqa/sZ19NEgUS8 JLpOQCHDWtMYTzCpg/gFh9lUagq9VTGk5UqaU= MIME-Version: 1.0 Received: by 10.204.5.194 with SMTP id 2mr6101676bkw.40.1255434665103; Tue, 13 Oct 2009 04:51:05 -0700 (PDT) In-Reply-To: <25870376.post@talk.nabble.com> References: <25870376.post@talk.nabble.com> From: Claus Ibsen Date: Tue, 13 Oct 2009 13:50:45 +0200 Message-ID: <5380c69c0910130450m4b1ede86w10e46f58867f5de9@mail.gmail.com> Subject: Re: Jetty asynchronus and parallel processing To: users@camel.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Oct 13, 2009 at 12:26 PM, SwenVogel wrote= : > > Hi, > > i want to receive data over an HTTP-POST request and immediately return, = so > the processing > is done asynchronously. The client should receive a HTTP status code 200 > without any response data. > > I have the following two routes: > > 1. > The route that receives the data, set some simple properties, and send th= e > data > to the message processing route. > > from(=93jetty:http:/localhost:8080/test=93) > =A0 =A0.setProperty(=85) > =A0 =A0.setProperty(=85) > =A0 =A0.inOnly(=93seda:messageProcessing=93) > > 2. > The message processing route do some post and pre processings and sends t= he > message to > endpoints that are determined at runtime, therefore i used the routing sl= ip. > > from(=93seda:messageProcessing=93) > =A0 =A0.threads() > =A0 =A0.process(=85) > =A0 =A0.routingSlip() > =A0 =A0.process() > > In the second route (seda:messageProcessing) i used the threads DSL to > enable parallel =A0processing, > but i cannot figure out if this ist the correct way! > > The problem with this solution ist that the jetty endpoint always returns > the request data as response data. > > So when i send: > > > =A0 =A0 =A0 =A0Apache Camel is cool! > > > I get back: > > > =A0 =A0 =A0 =A0Apache Camel is cool! > > Just transform the message to what you want to return, in your case an empty body then do .transform(constant("")); or maybe even a null .transform(null); from(=93jetty:http:/localhost:8080/test=93) .setProperty(=85) .setProperty(=85) .inOnly(=93seda:messageProcessing=93) .transform(constant("")); // set empty response to http client > > -- > View this message in context: http://www.nabble.com/Jetty-asynchronus-and= -parallel-processing-tp25870376p25870376.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > --=20 Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus