Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 64531 invoked from network); 28 Feb 2008 22:05:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2008 22:05:02 -0000 Received: (qmail 12062 invoked by uid 500); 28 Feb 2008 22:04:57 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 12046 invoked by uid 500); 28 Feb 2008 22:04:57 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 12037 invoked by uid 99); 28 Feb 2008 22:04:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2008 14:04:57 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of roman.kalukiewicz@gmail.com designates 216.239.58.185 as permitted sender) Received: from [216.239.58.185] (HELO gv-out-0910.google.com) (216.239.58.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2008 22:04:23 +0000 Received: by gv-out-0910.google.com with SMTP id e6so1389243gvc.5 for ; Thu, 28 Feb 2008 14:04:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=vqD+Rtq7adtq+uIQ5KjbwsXBR8sv2YcC0fcuEh45y80=; b=PkZNZSg+MiFU4C3OmndM5U+VT8YQHeBqwH8cv7y3QrQ3JOuRQFAW02N522JMr2bwt5faH9ub14uROVIoaVt5/7llVrDnVGn8lVbMl6zeayz4ZdgyPOITR6ZXMaPmHBCLDMidZogvm7a0RQIJtWTQXLYsIsFpQkUqw9LOo0TR5wk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LIwUv4OUb616gSn2N1P4B+uEtQ/+3R3vzBapLjGRXPg0apom9/TmjPR/qZTCYx/GDY+rFQygeVgo3txM6CV5Bj4R1rmXAaovtxUQmNCaEmJsBjyCP8/CseQ3EOJuVPIt43iT2BGM8ZsfOz/6sIstW8V+UpCQv+WhVtAcXhoEaSw= Received: by 10.142.125.5 with SMTP id x5mr6626052wfc.191.1204236270754; Thu, 28 Feb 2008 14:04:30 -0800 (PST) Received: by 10.142.233.19 with HTTP; Thu, 28 Feb 2008 14:04:30 -0800 (PST) Message-ID: Date: Thu, 28 Feb 2008 23:04:30 +0100 From: "Roman Kalukiewicz" To: camel-user@activemq.apache.org Subject: Re: exception trace in message In-Reply-To: <15740418.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <15740418.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 2008/2/28, cmdr : > > Hi Hello! > I would like to send messages with exception trace > > exception(Exception.class).to("activemq:queue:Exception"); > > from(XXX) > .process(new Processor() > { > public void process(Exchange exchange) throws Exception > { > throw new Exception("Processing Exception"); > } > }) > .to(XXX) > > I would like the activemq message to contain the exception message It looks that this exception is already associated with the exchange as a property named 'CamelCauseException'. What I think you should try, is to add .setHeader("exception", header("CamelCauseException")) to your exception handlig flow, so it will be used as an 'exception' property on JMS message. If it doesn't work you can try to explicitely use processor to extract the stacktrace from the exception. BTW. Maybe we could have converter toString(Throwable) to make it easier? Roman