Questions tagged [spring-camel]

Spring wrapper over Apache Camel

more details here

586 questions
0
votes
1 answer

Camel: filterFile DSL example

I want to use filterFile inside my camel route. I have route like this: from(String.format("sftp://%s@%s:%d/%s?password=%s&delete=true&readLock=changed&delay=%s, systemSettingsService.getSystemSettings().getSftpUserName(), …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

How can I know when the route completes processing a directory in camel?

How can I get a trigger once my route completes processing a directory and its sub directories in camel ? Is there any way I can specify this in the route ?
0
votes
3 answers

Camel - how to add request parameter(throwExceptionOnFailure) to url?

I hav following route: from("quartz2:findAll//myGroup/myTimerName?cron=" + pushProperties.getQuartz()) //.setBody().constant("{ \"id\": \"FBJDBFJHSDBFJSBDfi\" }") .to("mongodb:mongoBean?database=" +…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
0 answers

Camel sometimes partially lose data while file transportation

I have following code: //sftp from(String.format("sftp://%s@%s:%d/%s?password=%s&delete=true", sftpConfiguration.getUsername(), sftpConfiguration.getHost(), sftpConfiguration.getPort(), …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
0 answers

Could not save date field as ISO date in mongo db via Camel (Caused by: java.lang.IllegalArgumentException: Invalid BSON field name $date)

I have pojo like this: @Document(collection = "data") public class DataPoint { @Id private String id; private LocalDateTime createdDate; .... } in some code base I have following code: @Autowired private ProducerTemplate…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

how to iterate through an arraylist inside apache camel route , xml?

I want to iterate through a java arraylist passed as message header to a camel route via bean so that each string item which is basically an url can be passed as uri argument inside tag in camel route. I am passing an array list as message header…
Aniket Garg
  • 3
  • 1
  • 3
0
votes
1 answer

How to prevent camel redeliver files from sftp in case of exception

I have following camel configuration: from("file://" + FTP_FILES + "?idempotent=true") .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { throw new RuntimeException("test"); …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

Camel: how to route data from process method to another pipeline?

I have code like this: .from("file://" + FTP_FILES + "?idempotent=true") .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { list…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
0 answers

How to check File mime type in the middle of the Camel pipeline?

I have the following pipeline: from("sftp:....") .to("file://ftp_files"); I need to check mime type and stop it, in case if mime type is not as expected and send email. I know a way to check mime…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
0 answers

Camel log doesn't work

Camel route: from("seda:rest_upload") .log(LoggingLevel.WARN, "Got new file from sftp with name ${header.filename}") .to("file://rest_files?fileName=${header.filename}"); I see new files into rest_files but I don't…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

Is it possible to put in-memory file into camel pipeline?

I have org.springframework.web.multipart.MultipartFile in memory and I want to route it into filesystem. For examplde for sftp I could write something like this: public class DummyRoute extends RouteBuilder { ... …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
0 answers

Camel saves full http request but I want only attached file

I have the following code base: @Component public class DummyRoute extends RouteBuilder { @Override public void configure() throws Exception { rest("/upload").post().to("file://rest_files"); } @Bean public…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
0 answers

How to get file passed from post request in camel?

I have the following code: import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.restlet.RestletComponent; import…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
3 answers

Spring-Camel.How to read files from sftp (org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:)

First of all I installed sftp server locally and I can connect to it using bitwise ssh client: my credentials: login:tester password:password sftp folder looks like this: And I wrote following code: @PostConstruct public void init() { …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

How to listen file modifications in spring-camel?

I am novice in spring-camel and apache camel overall I've read http://camel.apache.org/file.html and I want to listen file modifications. Thus I wrote: @PostConstruct public void init() { from("file:feed.txt") .log("msg: ${body}") …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710