camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Thullner <rthull...@gmx.at>
Subject Re: Camel transports in ServiceMix
Date Tue, 25 Mar 2008 10:02:01 GMT



James.Strachan wrote:
> 
> 
> 
> Could you post the code you're using to send the message please?
> Sounds like something is a bit strange.
> 
> FWIW when using ActiveMQ a TextMessage should result in an
> ActiveMQTextMessage being sent. If an ActiveMQMessage is received then
> that usually indicates an empty body
> 
> 

Here is what I do:

This is how I send my message:

TextMessage statusInformationMessage = session.createTextMessage();
statusInformationMessage.setText(generateFlightPlan().toString());
statusInformationMessage.setStringProperty("test", "test");
statusInformationMessage.setJMSCorrelationID(""+System.currentTimeMillis());
producer.send(statusInformationMessage);


In ServiceMix I have configured a consumer endpoint which looks like this

<jms:endpoint service="splitter:receiveTravelplan"
   endpoint="endpoint"
   targetService="splitter:camelRouter"
   role="consumer" 
   destinationStyle="queue"
   jmsProviderDestinationName="camel.train.plan.queue"
   defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
   connectionFactory="#connectionFactory" />

At last my Camel route looks like this:
from("jbi:endpoint:http://eip.splitter.servicemix/camelRouter/endpoint")
.to("activemq:queue:camel.train.plan.queue.neusiedlsee");


Now I receive a message of type ActiveMQMessage in my JMS receiver. 

I have made some more interesting observations:
When I do not use the JMS consumer service unit and also use the Camel JBI
to directly receive message, everything works fine. So when I use this camel
route in ServiceMix everything works fine and I receive an
ActiveMQTextMessage:
from("activemq:queue:camel.train.plan.queue")
.to("activemq:queue:camel.train.plan.queue.neusiedlsee");

My second observations is that: When I use the new JMS endpoints of
ServiceMix like <jms:consumer ...> for receiving JMS messages, I receive an
ActiveMQObjectMessage at my final receiver. 

However I think, this all is a ServiceMix isssue and not a Camel issue, so
perhaps it is placed now on the wrong list. 

Best regards,
Robert
-- 
View this message in context: http://www.nabble.com/Camel-transports-in-ServiceMix-tp16222771s22882p16273148.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message