You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "s.marjanovic" <sl...@gmail.com> on 2015/04/06 01:27:33 UTC

Routing from eventadmin to active MQ

Hello,

I'm new to camel and I'm facing a problem when trying to route from
eventadmin component to an activemq.

The route is as configured below:

from("eventadmin:*").routeId("myRoute").to("amq:topic:myTopic");

I understand that some sort of conversion/processing will be needed in order
for camel to handle me sending an osgi event (org.osgi.service.event.Event)
to an activemq. I tried to achieve the said conversion by including a custom
message converter as shown below:

from("eventadmin:*").routeId("myRoute").to("amq:topic:myTopic?&messageConverter=#myMessageConverter");

but the following exception occurs:

An exception occurred: java.lang.NullPointerException
The MEP is : InOnly
in: Message body contains an object that currently can't be handled: Event
()

Furthermore, the exception is thrown again and again resulting in ~10k lines
in log file per second and my jboss fuse instance becomes unresponsive and
has to be stopped from task manager.

In truth, the custom message converter I included was there just so I can
try to debug and figure out how to proceed, but because of the above that is
not possible. Are there other means of conversion available or extendable
within camel that would help me solve this problem?

Info:
Windows 7
JDK 1.7
Routes are deployed as bundles under Jboss Fuse
Camel version 2.12.0.redhat-610379

Kind regards,
Slavisa



--
View this message in context: http://camel.465427.n5.nabble.com/Routing-from-eventadmin-to-active-MQ-tp5765348.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Routing from eventadmin to active MQ

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Its maybe easier to do a message translation
http://camel.apache.org/message-translator.html

Where you can do a pojo to String conversion to include the details you need.

And then you dont need the jms message converter.



On Mon, Apr 6, 2015 at 1:27 AM, s.marjanovic
<sl...@gmail.com> wrote:
> Hello,
>
> I'm new to camel and I'm facing a problem when trying to route from
> eventadmin component to an activemq.
>
> The route is as configured below:
>
> from("eventadmin:*").routeId("myRoute").to("amq:topic:myTopic");
>
> I understand that some sort of conversion/processing will be needed in order
> for camel to handle me sending an osgi event (org.osgi.service.event.Event)
> to an activemq. I tried to achieve the said conversion by including a custom
> message converter as shown below:
>
> from("eventadmin:*").routeId("myRoute").to("amq:topic:myTopic?&messageConverter=#myMessageConverter");
>
> but the following exception occurs:
>
> An exception occurred: java.lang.NullPointerException
> The MEP is : InOnly
> in: Message body contains an object that currently can't be handled: Event
> ()
>
> Furthermore, the exception is thrown again and again resulting in ~10k lines
> in log file per second and my jboss fuse instance becomes unresponsive and
> has to be stopped from task manager.
>
> In truth, the custom message converter I included was there just so I can
> try to debug and figure out how to proceed, but because of the above that is
> not possible. Are there other means of conversion available or extendable
> within camel that would help me solve this problem?
>
> Info:
> Windows 7
> JDK 1.7
> Routes are deployed as bundles under Jboss Fuse
> Camel version 2.12.0.redhat-610379
>
> Kind regards,
> Slavisa
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Routing-from-eventadmin-to-active-MQ-tp5765348.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/