Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A6D0C17D4F for ; Fri, 10 Apr 2015 15:40:22 +0000 (UTC) Received: (qmail 44607 invoked by uid 500); 10 Apr 2015 15:40:22 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 44568 invoked by uid 500); 10 Apr 2015 15:40:22 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Delivered-To: moderator for dev@camel.apache.org Received: (qmail 29572 invoked by uid 99); 10 Apr 2015 15:34:49 -0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of camel@bradreitmeyer.com does not designate 162.253.133.43 as permitted sender) Date: Fri, 10 Apr 2015 08:32:52 -0700 (MST) From: unleashed85 To: dev@camel.apache.org Message-ID: <1428679972252-5765607.post@n5.nabble.com> In-Reply-To: References: <1427123764510-5764656.post@n5.nabble.com> <1427125298584-5764658.post@n5.nabble.com> <1427903517880-5765168.post@n5.nabble.com> Subject: Re: Adding inOut support to the RabbitMQ component MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Williem, Would you like me to go ahead and move those classes? If so is it fine for the tests to stay in the components or would I also need a set of tests in camel-core? I'm running into another issue I could use some advice on. I'm trying to make the functionally equivalent to the camel-jms component which includes passing exceptions through. For example if the consumer side throws a NullPointerException I want the consumer to serialize the exception so the NullPointerException gets set on the exchange after the reply. My problem is that the com.rabbitmq.client only accepts byte[] and camel's DefaultTypeConverter wont convert a Serializable object to a byte[]. Thus it throws a NoTypeConversionAvailableException. 1) It seems odd that the camel-rabbitmq component cant natively send objects that implement Serializable. Am I missing a simple setting somewhere? 2) To make throwing exceptions work I ended up just writing the exception out to a byte[] with a ByteArrayOutputStream / ObjectOutputStream and setting a header to indicate there was an exception. Then when it gets a reply it checks that header and uses a ByteArrayInputStream / ObjectInputStream to deserialize. While this seems to work well, I assume there is a more generic way to do this? Thanks, Brad -- View this message in context: http://camel.465427.n5.nabble.com/Adding-inOut-support-to-the-RabbitMQ-component-tp5764656p5765607.html Sent from the Camel Development mailing list archive at Nabble.com.