camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: ActiveMQ Advisory Message and Camel (no type converter available)
Date Fri, 12 Mar 2010 09:07:37 GMT
Hi Willem,

Thanks for the info. IT works fine now with what you suggest :

10:06:18,328 | INFO  | tenerContainer-1 | elca                             |
rg.apache.camel.processor.Logger   88 | Exchange[
, Id:ID:dell-charles-1395-1268384347390-3:0:0:0:12
, Properties:{CamelBinding=org.apache.camel.component.jms.JmsBinding@1d75e80,
CamelToEndpoint=log://com.elca?multiline=true&showAll=true}
, Headers:{originBrokerURL=vm://master, JMSType=Advisory,
originBrokerId=ID:dell-charles-1395-1268384347390-2:0, JMSDeliveryMode=1,
JMSDestination=top
ic://ActiveMQ.Advisory.Connection, JMSRedelivered=false, JMSXGroupID=null,
JMSMessageID=ID:dell-charles-1395-1268384347390-3:0:0:0:12, JMSReplyTo=null
, JMSExpiration=0, JMSTimestamp=0, JMSCorrelationID=null,
originBrokerName=master, JMSPriority=0}
, BodyType:org.apache.activemq.command.ActiveMQMessage
, Body:ActiveMQMessage {commandId = 0, responseRequired = false, messageId =
ID:dell-charles-1395-1268384347390-3:0:0:0:12, originalDestination = null
, originalTransactionId = null, producerId =
ID:dell-charles-1395-1268384347390-3:0:0:0, destination =
topic://ActiveMQ.Advisory.Connection, transacti
onId = null, expiration = 0, timestamp = 0, arrival = 0, brokerInTime =
1268384778312, brokerOutTime = 1268384778312, correlationId = null, replyTo
=
null, persistent = false, type = Advisory, priority = 0, groupID = null,
groupSequence = 0, targetConsumerId = null, compressed = false, userID =
null
, content = null, marshalledProperties =
org.apache.activemq.util.ByteSequence@145240a, dataStructure =
ConnectionInfo {commandId = 1, responseRequire
d = true, connectionId = ID:dell-charles-1408-1268384777218-0:0, clientId =
ID:dell-charles-1408-1268384777218-1:0, userName = , password = *****, bro
kerPath = null, brokerMasterConnector = false, manageable = true,
clientMaster = true}, redeliveryCounter = 0, size = 0, properties =
{originBrokerNam
e=master, originBrokerId=ID:dell-charles-1395-1268384347390-2:0,
originBrokerURL=vm://master}, readOnlyProperties = true, readOnlyBody =
true, droppab
le = false}
, Out: null]

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Fri, Mar 12, 2010 at 8:59 AM, Willem Jiang <willem.jiang@gmail.com>wrote:

> Hi Charles,
>
> Can you try to set the activemq endpoint's URI with mapJmsMessage=false
> option?
> As camel-jms will try to extract the message body into its known type, and
> I don't think it support ActiveMQMessage out of box.
> With mapJmsMessage=false, the message body will be set with the JMSMessage
> that camel-jms get from MS queue.
>
> Willem
>
>
>
> Charles Moulliard wrote:
>
>> Hi,
>>
>> I try to read messages published in a topic of ActiveMq -->
>> ActiveMQ.Advisory.* but get a type error converter has the body is null
>>
>>        <camel:route>
>>            <camel:from    uri="activemq:topic:ActiveMQ.Advisory.*" />
>>            <camel:convertBodyTo
>> type="org.apache.activemq.command.ActiveMQMessage"/>
>>            <camel:to uri="log:com.elca?showAll=true&amp;multiline=true" />
>>        </camel:route>
>>
>> How can I avoid this error ?
>>
>> Causedby: No type converter available to convert from type: null to the
>> required type: org.apache.activemq.command.ActiveMQMessage with value
>> null.
>> Exchange
>> [JmsMessage: ActiveMQMessage {commandId = 0, responseRequired = false,
>> messageId = ID:dell-charles-2709-1268314715843-1:0:0:0:8,
>> originalDestination =
>>  null, originalTransactionId = null, producerId =
>> ID:dell-charles-2709-1268314715843-1:0:0:0, destination =
>> topic://ActiveMQ.Advisory.Connection, tran
>> sactionId = null, expiration = 0, timestamp = 0, arrival = 0, brokerInTime
>> =
>> 1268314769343, brokerOutTime = 1268314769343, correlationId = null, reply
>> To = null, persistent = false, type = Advisory, priority = 0, groupID =
>> null, groupSequence = 0, targetConsumerId = null, compressed = false,
>> userID
>> =
>>  null, content = null, marshalledProperties =
>> org.apache.activemq.util.ByteSequence@97e111, dataStructure = RemoveInfo
>> {commandId = 0, responseRequire
>> d = true, objectId = ID:dell-charles-2711-1268314762093-0:0,
>> lastDeliveredSequenceId = 0}, redeliveryCounter = 0, size = 0, properties
>> =
>> {originBroker
>> Name=master, originBrokerId=ID:dell-charles-2709-1268314715843-0:0,
>> originBrokerURL=vm://master}, readOnlyProperties = true, readOnlyBody =
>> true, drop
>> pable = false}]. Caused by:
>> [org.apache.camel.NoTypeConversionAvailableException - No type converter
>> available to convert from type: null to the requi
>> red type: org.apache.activemq.command.ActiveMQMessage with value null]
>>        at
>>
>> org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:103)
>>        at
>>
>> org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:55)
>>        at
>>
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>>
>> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
>>        at
>>
>> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
>>        at
>>
>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:161)
>>        at
>>
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>>
>> org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
>>        at
>>
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
>>        at
>>
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
>>        at
>>
>> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
>>        at
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
>>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
>>        at
>>
>> org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)
>>        at
>>
>> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
>>        at
>>
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
>>        at
>>
>> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:84)
>>        ... 9 more
>>
>> Kind regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>>
>

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