You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jose Nogueira Alban <Jo...@bbc.co.uk> on 2014/08/20 11:54:16 UTC
getOriginalInMessage().getBody
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