See ConsumeMessageConverterTest ProduceMessageConverterTest in the camel-jms unit tests
On Fri, Nov 5, 2010 at 5:32 PM, jh0331 <[email protected]> wrote: > > yes, I meant the messageConverter option of the JMS component. > > I looked in the unit test source, and I see no tests that utilize > MessageConverter. perhaps I have overlooked them? > > let me explain why I am asking... > > basically, I have a cbridge route bridging a weblogic queue to a websphere > mq queue. on the weblogic side, a header element is being inserted called > JMS_BEA_RedeliveryLimit. here is an example: > > 05 Nov 2010 11:47:54,998[MESSAGE :]Exchange[Id:ID:<587743.1288971857951.0>, > Properties:{camelbinding=org.apache.camel.component.jms.jmsbind...@98d70d, > CamelToEndpoint=log://Bridge?showBody=false&showExchangeId=true&showHeaders=true&showProperties=true}, > Headers:{JMSRedelivered=true, JMSType=null, JMSExpiration=0, > JMSTimestamp=1288971857951, JMSCorrelationID=null, > JMSMessageID=ID:<587743.1288971857951.0>, > JMSDestination=server-jms!RequestBridgeQueue, JMSXDeliveryCount=8, > JMSPriority=4, JMSXGroupID=null, JMSDeliveryMode=2, JMSReplyTo=null, > JMS_BEA_RedeliveryLimit=10}, BodyType:String] > > mq related code is generating the following error: > > Caused by: com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCC0050: > The property name 'JMS_BEA_RedeliveryLimit' is reserved and cannot be set. > The supplied property name begins with the JMS prefix, but is not one of the > supported, settable properties. Check the property name and correct errors. > > so I was thinking I could create a MessageConverter, and remove that header > property before the message is passed to websphere. does this approach make > sense? > > I have not been able to get the following approach working as mentioned on > the JMS Component page: > > from("file://inbox/order").to("jms:queue:order?messageConverter=#myMessageConverter"); > > I was able to trigger my message converter in a junit by manually creating > the components and starting routes without the notation specified above, but > this approach is not working on live system yet. also, I don't really want > to manually create the components, instead relying on camel context and > scanner to automatically set everything up... > > any advice is appreciated. > > thanks! > jon > > > jh0331 wrote: >> >> Does anyone have a MessageConverter example handy? I am having problems >> getting this to work... >> >> There are a few existing posts on this topic, but none with clear answers >> / guidance. >> >> thanks! >> jon >> > > -- > View this message in context: > http://camel.465427.n5.nabble.com/MessageConverter-Example-tp3250752p3252112.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
