Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B0B41200ACC for ; Mon, 2 May 2016 14:11:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AF9161609B0; Mon, 2 May 2016 14:11:26 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 296B41609A1 for ; Mon, 2 May 2016 14:11:26 +0200 (CEST) Received: (qmail 84597 invoked by uid 500); 2 May 2016 12:11:25 -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 Delivered-To: moderator for users@camel.apache.org Received: (qmail 74179 invoked by uid 99); 2 May 2016 12:07:39 -0000 X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.002 X-Spam-Level: X-Spam-Status: No, score=-0.002 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Message-ID: <57274300.7050101@ast.dfs.de> Date: Mon, 02 May 2016 14:07:28 +0200 From: Sven Bauhan User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130910 Thunderbird/17.0.9 MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: How to implement AsyncCallback for AsyncProcessor? References: <57211B73.8020107@ast.dfs.de> <57273CC6.7090805@ast.dfs.de> <57273FF2.706@ast.dfs.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at ast.dfs.de archived-at: Mon, 02 May 2016 12:11:26 -0000 On 05/02/16 13:57, Claus Ibsen wrote: > On Mon, May 2, 2016 at 1:54 PM, Sven Bauhan wrote: >> I have context component to implement a protocol in our company. >> >> As the success of a transmission depends a response from the receiver, it >> has to be handled asynchronously. >> >> Now I try to find a way to propagate a timeout exception, if no response is >> received, out of the context component into the calling application route. >> > What whatever you have that triggers the timeout would then set an > exception on the exchange and call the done(false) method on the async > callback. > > Camel has a ExchangeTimeoutException you can use. > For example: exchng.setException(new MessageSendException()); I tried already, but it did not work yet. Is there an example implementation for something like this? How to use the ExchangeTimeoutException? Can I combine it with an aggregator?