Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 14077 invoked from network); 7 Jul 2010 14:43:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jul 2010 14:43:53 -0000 Received: (qmail 39199 invoked by uid 500); 7 Jul 2010 14:43:53 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 39167 invoked by uid 500); 7 Jul 2010 14:43:53 -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 39159 invoked by uid 99); 7 Jul 2010 14:43:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 14:43:52 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-ww0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 14:43:47 +0000 Received: by wwb18 with SMTP id 18so642796wwb.20 for ; Wed, 07 Jul 2010 07:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=z1Utn0pKcjnN4cMz86qskd6f2jjp7ko7V5PVBkcxESI=; b=APWekfJVXGZpn4Ad83cOBZR3NGpYR27B3+ABAKLdI+0d6FbQa3PUHZbG7HW9tbI9n6 4wmN0rLJfijDdn9dNtt1UokzUZXlLt03FVD+uhlZpIHbWakyQxG22d2CiwUcnMq+uKIj Puv28tFO/HB4MToleBCichBe6uV3VV2y8WTZc= 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; b=qSIxzC0QTdhzEBzL9yp6zUq1gbhpKLOI1XwqS5FaKrLJSPC1bWnIIxeq2LD+ADv1Eq Lh9cH/hHevEMg7YKGunWmfH3vO538KCkJVfwvLhD9qIcjD5JhSE1QPbLbj3mPEBPa05w WGx1Rbk3eQzgcMLfi/ZsJQ0Y4LNoxOYXqt6bc= Received: by 10.216.231.73 with SMTP id k51mr1054393weq.5.1278513805247; Wed, 07 Jul 2010 07:43:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.25.142 with HTTP; Wed, 7 Jul 2010 07:43:05 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Wed, 7 Jul 2010 16:43:05 +0200 Message-ID: Subject: Re: Correlation, CXF, JMS and timeout To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Sometimes its easier to use a bit of Java code. If you read chapter 10 about the async client API you can from a Processor / Bean just send the Exchange to the webservice endpoint uri. And then use the Future handle to wait with timeout. Then you know if the Exchange was done without the timeout period or not. On Wed, Jul 7, 2010 at 4:17 PM, Bruno Dusausoy wrote: > Hi, > > First, thanks for your help last time and thanks to the authors of "Camel > in Action"; this is a great book. > After solving my last problem - which was entirely my fault btw - I now > try to design a bigger project. > > I'm trying to rewrite a project I've made some time ago. > It used BPEL, EJB's (both Session Beans and Entity Beans), JAX-WS > (HTTP/SOAP) and JMS. > I plan on using Camel, CXF and ActiveMQ for the rewriting. > > I've read most of the aforementioned book, but some topics need some > enlightening. > Here are the steps that I'm trying to reproduce : > > 1) A file is read on the filesystem. > 2) It is analyzed and processed. > 3) After the process, a CXF webservice client is invoked. > 4) The return value of the latter step is sent to a JMS queue. This value > will be used for correlation. > 5) This "process" ends up here, waiting for another file to be read > (return to step 1). > > == These steps are currently implemented and are ok. > == Another process then steps in > > 6) The JMS message is read from the queue. > 7) A Timeout is then launched. > 8) If the timeout has been reached and step 9) has not been accomplished > (with the right correlation set), then another processing - typically > sending alert email and stopping the process - is done. > 9) A CXF service implementation receives a message. > 10) It parses the message, using a part of it for correlation with the > message fetched from the JMS queue. > 11) It does its processing. > > So, to summarize : if the timeout has been reached and nothing has been > received we send an email, otherwise we process what have been received and > discard the timeout. > > I was thinking about using the Aggregator EIP in order to implement the > steps 6->11, using a completionTimeout but I'm confused with two things : > * can I aggregate messages coming from different endpoints (in this case, > CXF and JMS) or should I route them to a unique endpoint ? > * I don't see how to use the completionTimeout in this case. > > Can someone shed some light on this ? > > Thanks a lot. > > Regards. > -- > Bruno Dusausoy > YP5 Software > -- > Pensez environnement : limitez l'impression de ce mail. > Please don't print this e-mail unless you really need to. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus