I'm new to Camel so if this is the wrong mailing list my apologies.
 
In our system we want to send a tibco rendezvous (TibRv) message (basically a 
key/value message), Camel doesn't come with a TibRv component so we are going 
to use JMS. Then use a bridge available within Tibco EMS to export the JMS 
message onto TibRv.
 
This works mostly fine but the problem is with dates.
 
We have a camel route with a translator that turns our canonical pojo into a 
java.util.Map which we then send as a JMS MapMessage.
 
Route:
 
from("file:src/data?noop=true")
      .unmarshal(jaxb)
      .transform().method("myTranslator")
      .to("activemq:queue:nomura.fiet.stp.radial.trades?jmsMessageType=Map");
 
Class:
 
public class MyTranslator {
  public Map<String, Object> translate(Transaction tradeTransaction) {...}
 
The map can hold java primatives and dates. Now a JMS MapMessage can't hold a 
Date so I need to format any dates as a string. How is this based acheived in 
Camel? I could just not put any dates into the map created during 
transformation, but preformat them as strings. But this doesnt feel right as 
the translator is worrying about the transport being JMS.
 
I know Camel has plugable type convertors - can I use an existing one / 
implement a new one that hides the transport date conversion?
 
Thanks

Reply via email to