camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From unleashed85 <>
Subject Re: Adding inOut support to the RabbitMQ component
Date Fri, 10 Apr 2015 15:32:52 GMT
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

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?


View this message in context:
Sent from the Camel Development mailing list archive at

View raw message