camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Adding inOut support to the RabbitMQ component
Date Tue, 14 Apr 2015 06:18:55 GMT
Hi Brad

It's not surprise that RabbitMQ cannot natively send the Serializable
objects, as the server is not wrote in Java.
Please feel free to send a PR if you have something to show us.

Willem Jiang

Red Hat, Inc.

Blog: (English)
Twitter: willemjiang
Weibo: 姜宁willem

On Fri, Apr 10, 2015 at 11:32 PM, unleashed85 <>

> 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:
> Sent from the Camel Development mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message