Problem: 
"exchange.getUnitOfWork().getOriginalInMessage().getBody(String.class)" inside 
a processor, for AWS SQS endpoint and File endpoint, returns inconsistent 
result.

Details:

  1.  Given SQS endpoint: "exchange.getUnitOfWork().getOriginalInMessage()" 
returns a "DefaultMessage" reference, and subsequent ".getBody(String.class)" 
successfully returns the original body.
  2.  Given File endpoint: "exchange.getUnitOfWork().getOriginalInMessage()" 
returns a "GenericFileMessage" reference, and subsequent 
".getBody(String.class)" returns null, because the object is actually a 
"GenericFile" reference. That's not what we were expecting to receive. It seems 
to be conceptually wrong to return a File object as the Body of the original 
message, hence it looks like a bug.

Could someone please explain if they do not agree it's a bug?

Regards,
Jose Alban

Reply via email to