Re: Camel route stop after activeMQ shutdow

2016-12-28 Thread axdz
I know camel should not stop. Here, when camel route is running,* I stop activeMQ server and then camel route also stops.* -- View this message in context: http://camel.465427.n5.nabble.com/Camel-route-stop-after-activeMQ-shutdow-tp5791949p5791962.html Sent from the Camel - Users mail

Camel route stop after activeMQ shutdow

2016-12-27 Thread axdz
I have a route *from("activemq:queuetest")...* and everything run ok. I stop activeMQ server, camel also stop after reconnecting fail. Please explain to me or give me some document about it. Thanks, -- View this message in context: http://camel.465427.n5.nabble.com/Camel-route-stop-

RE: Copy current file in a folder

2016-12-09 Thread axdz
With code *Date date = new Date(); date.setHours(9); date.setMinutes(44); date.setSeconds(1); System.out.println("now :" + date.getTime()); if (date.getTime() > file.getLastModified()) { System.out.println(file.getFileName() + ":" + file

Re: Copy current file in a folder

2016-12-07 Thread axdz
Dear, I tried to implement by using their timestamp. Please tell me LastLastModified is timestamp or not? With LastModified , I can not compare with 05:00. public class FileFilters implements GenericFileFilter { public boolean accept(GenericFile file) { System.out.println(file.g

Re: Copy current file in a folder

2016-12-07 Thread axdz
Dear, To distinguish those files, I only one information ,some file were moved to folder1 before 05:00 (5 file), some file were moved to folder1 after 05:00(2 file), later camel copy these file (files were copy to folder1 before 05:00) to folder2. How can I implement this work? Thanks for replyin

Re: Copy current file in a folder

2016-12-07 Thread axdz
Dear, I tried to implement this with cron policy.But when these 5 files are being copied, if I move 2 files (file6, file7) to folder1, camel also copy these 2 files from folder1 to folder2. Thanks for replying to me. -- View this message in context: http://camel.465427.n5.nabble.com/Copy-cur

Re: Copy current file in a folder

2016-12-07 Thread axdz
Dear, These five file have no specific name or pattern. My problem is : Copy all file in a folder at 05:00 everyday.files are moved to this folder after 05:00 will not be copied and will be copied at 05:00 next day.Here, I only want to copy one time a day. Thanks for replying to me. Please give

Re: Copy current file in a folder

2016-12-07 Thread axdz
Dear, Thanks for replying to me. Yes I want copy files one time at 05:15 PM everyday. I set route start time at 05:15 PM. At 05:15 PM there are 5 files in folder1 and I only need to copy these 5 files. file6 and file7 will be copied at 05:15 PM next day. How can I do this work? Thanks, -- V

RE: Copy current file in a folder

2016-12-07 Thread axdz
Dear, I tried to implement fileFilter, but I don't know how to copy only 5 files (file1, file2, file3, file4, file5) *public class FileFilters implements GenericFileFilter { public boolean accept(GenericFile file) { String fileName = file.getFileName(); return false; } }

Copy current file in a folder

2016-12-06 Thread axdz
Dear all, I have a route from("file:D:\\folder1").to("file:D:\\folder2"). When route starts, folder1 has 5 files (file1, file2, file3, file4, file5) While route is running, I copy 2 files (file6, file7) into folder1.So when route finishs, all files (7 files) were copied to folder2. I only want t

Re: moving file with camel

2016-12-06 Thread axdz
Dear, -I want to filter multiple format file (as .html,.jpg...).How can I do it? -I want to set time (time format only includes hours as 04:00) for route moving file.Please give me some advice. Thanks, -- View this message in context: http://camel.465427.n5.nabble.com/moving-file-with-camel-t

Send message to temporary queue

2016-10-14 Thread axdz
Hi all, Follow this link http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html I did it but, it can not send message to temporary queue (which is got from replyTo field). //Set the

Access header in camel route

2016-10-05 Thread axdz
Hi all, I config a route in xml file * * and here i MyProcessor class * public class MyProcessor implements Processor { public void process(Exchange exchan

Access responseRequired ActiveMQTextMessage

2016-10-03 Thread axdz
Hi all, I send a message to a queue named test .Below is some code I used and sent successfully. ActiveMQTextMessage message = new ActiveMQTextMessage(); message.setResponseRequired(true); message.setText("9");

Re: Access responseRequired ActiveMQTextMessage

2016-10-03 Thread axdz
I did it use replyto. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Access-responseRequired-ActiveMQTextMessage-tp5788302p5788306.html Sent from the Camel - Users mailing list archive at Nabble.com.

Access responseRequired ActiveMQTextMessage

2016-09-30 Thread axdz
Hi all, I send a message to a queue named *test* .Below is some code I used and sent successfully. ActiveMQTextMessage message = new ActiveMQTextMessage(); message.setResponseRequired(true); message.setText("9");

Re: Selector multiple field in header

2016-09-30 Thread axdz
Thank you so much.It worked!! -- View this message in context: http://camel.465427.n5.nabble.com/Selector-multiple-field-in-header-tp5788180p5788232.html Sent from the Camel - Users mailing list archive at Nabble.com.

Selector multiple field in header

2016-09-28 Thread axdz
Hi all, I have a problem with selector activemq I have a queue with name A . I sent to this queue with some messages.All these message have field a1,a2,a3 in their header. I found solution for selector with one field as from("activemq:A?selector=a1='valuea1'").to("endpoint") Now,I want to