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 F2E6C64A9 for ; Mon, 25 Jul 2011 07:38:27 +0000 (UTC) Received: (qmail 54225 invoked by uid 500); 25 Jul 2011 07:38:27 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 53996 invoked by uid 500); 25 Jul 2011 07:38:19 -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 53986 invoked by uid 99); 25 Jul 2011 07:38:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2011 07:38:11 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of willem.jiang@gmail.com designates 209.85.210.49 as permitted sender) Received: from [209.85.210.49] (HELO mail-pz0-f49.google.com) (209.85.210.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2011 07:38:01 +0000 Received: by pzk33 with SMTP id 33so8345361pzk.36 for ; Mon, 25 Jul 2011 00:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=JDUyjsknzXIVc+Om8NPFdwZ2BdB5GO6r317VECJKLuk=; b=yBWDNyJokAhfNLb88BjnDx/WFrYhSwDSuh83kZncq1gTrNyIyCL/jeSKwqRUl7u75z W2TH9H7xuRstXAbITfpA745AlhcN7XUrILsNGUywsvzaJgz0hwZP0E1t9yDXVx4k4flA SIUiAxaT17ZfuqZVB0ojkUlhMhMTJ5pBOCQAY= Received: by 10.68.63.136 with SMTP id g8mr7358797pbs.401.1311579460547; Mon, 25 Jul 2011 00:37:40 -0700 (PDT) Received: from [192.168.0.158] ([123.116.54.233]) by mx.google.com with ESMTPS id k8sm4293493pbk.47.2011.07.25.00.37.37 (version=SSLv3 cipher=OTHER); Mon, 25 Jul 2011 00:37:38 -0700 (PDT) Message-ID: <4E2D1D3E.30503@gmail.com> Date: Mon, 25 Jul 2011 15:37:34 +0800 From: Willem Jiang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: Which combination of EIPs for this scenario? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I don't know if you implement a new component for your socket integration instead of use the netty or mina component directly. For the Camel producer, you can implement AsyncProcessor and let the callback.done be called when your producer got the response. I think you should let the camel route do retry control instead of implement it in your component. Willem On 7/22/11 2:36 PM, Taariq Levack wrote: > Hi > > I'm doing some socket integration, there's an agreed handshake etc, > then both parties can send and receive on 2 different ports. > I have to keep track of the outbound messages so I can retry if I > don't receive a response within > the timeout limit. > > Now of course I can't use normal Camel retry DSL, because we send to > the socket and receive on another port. > So what I've started with, which isn't working really well hence the > post, is a multicast to both the socket and an > aggregator. > The aggregator will maybe timeout and then send a message right back > to the route that does the > multicast to both socket and aggregator. > In happy days it will correlate the socket's response and then be able > to send this new exchange to another endpoint. > > Any better ideas while I panelbeat that some more, because I think it > should work, it's simulating some async delays and whatnot in the test > setup that I think is responsibly for me going a little bit grey here, > but anyway. > > Thanks, > Taariq > -- Willem ---------------------------------- FuseSource Web: http://www.fusesource.com Blog: http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang