Hi,
    I have gone through lots of regarding the issue and came to know if I
use consumer.receiveBody() I can move the file but when I am using it I am
getting error like:

Exception while consuming the locates file:null :Failed to resolve endpoint: 
file:///home/... Failed to resolve endpoint:
Check the uri if the parameters are spelt correctly and that they are
properties of the endpoint.
 Unknown parameters=[{amp;doneFileName=LOADAVAILBNYM,
amp;move=/home/cameldata/processedFiles/${file:onlyname.noext}_${date:now:yyyyMMdd}.TXT,
 amp;moveFailed=/home/cameldata/errorfile}]

Here is my function to consume a file from the directory:
public void consumeBnymFile(Exchange arg) {
                String
endPointUri="file:{{inbound_home}}/bony?include=.*_BNYM_.*txt&move={{data_home}}/${file:onlyname.noext}_${date:now:yyyyMMdd}.TXT&moveFailed={{data_home}}/errorfile&doneFileName=LOADAVAILBNYM";
             consumer.start();
            while (true) {
                Object newBody=consumer.receiveBody(endPointUri, 2000);
                //Exchange ex = consumer.receive(fileUri,2000);
                String streamName=(String)arg.getIn().getHeader("streamName");
                if (newBody != null) {
                    arg.getIn().setBody(newBody);  {    


I greatlty appreciate any help in advance.
Thanks.            




--
View this message in context: 
http://camel.465427.n5.nabble.com/Unable-to-use-move-movefailed-and-donefilename-with-consumer-template-endpoint-Uri-tp5736913.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to