Ah..!

So, in the same JVM, using Java object simply uses an instance
pointer. But if I'm going to produce into an ActiveMQ endpoint, I
should make sure the MQ in the same JVM with vm transport or, I should
marshall into protobuf bytes. The MQ is used for my own system too,
but different physical location.


On Wed, Apr 30, 2014 at 3:49 PM, [email protected]
<[email protected]> wrote:
> What do you mean by different systems? Different Camel Processors?
>
> You can store your data as body/property and this is a pure instance pointer. 
> As long the message is not deep cloned/serialized as bytestream there is no 
> overhead passing this message through the camel routes (in one vm).
>
> Can you provide more info maybe I simply did not get it?
>
> Jens
>
> Von meinem iPhone gesendet
>
>> Am 30.04.2014 um 08:34 schrieb Muhammad Ichsan <[email protected]>:
>>
>> Hi
>>
>> 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
>> http://www.michsan.web.id 一緒に勉強しましょう!
>>
>> Yang berkualitas memang beda rasanya!
>> http://rizqi-cookies.com



-- 
~The best men are men who benefit to others
http://www.michsan.web.id 一緒に勉強しましょう!

Yang berkualitas memang beda rasanya!
http://rizqi-cookies.com

Reply via email to