camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Muhammad Ichsan <>
Subject Fastest Data Holder
Date Wed, 30 Apr 2014 06:34:12 GMT

I'm thinking about creating a common message which will hold all data
during all business invocations across different system in Camel (of
course with translation for vary systems).

In my first thought, I'm going to use a simple one like Map. The the
payload is simple to use in processor. I can use

public Map setFee(Map<String, String> commonMessage) {
  // Modif

  return commonMessage;

But sending Map along the way of transaction process means that there
will be conversion of java.util.Map into bytes over and over again.

My second thought is, using XML or JSON text. But I face more complex
processing in the processor

public String setFee(String commonMessage) {
  Map<String, String> map = helper.toMap(commonMessage);

  // Modif

  return helper.toString(map);

So, which one is the most efficient way?

~The best men are men who benefit to others 一緒に勉強しましょう!

Yang berkualitas memang beda rasanya!

View raw message