apache-camel

Apache Camel: What is difference between Message Translator and Content Enricher with Example?

北慕城南 提交于 2020-04-18 12:33:51
问题 I hit database get 10 employees; on base of each employee i hit another database and fetch some information and concatenate the same. As per my understanding, It can be done either in .process() or in .enrich() (using aggregator) .to("jdbc:masterdata?outputClass=com.diavry.integrator.Employee") .to("log:?level=INFO&showBody=true") .process(e -> { List<Employee> eiEmployees = (List<Employee>) e.getIn().getBody(List.class); for (Employee employee : eiEmployees) { PreparedStatement statement =

Spring Boot properties usage in Apache Camel route

风流意气都作罢 提交于 2020-04-13 07:31:29
问题 Is this possible to use Spring Boot properties in Apache Camel route? @Value is working fine but is this possible to directly place in place holders of expressions. Update: I know PropertiesComponent but which will be one more configuration apart from Applicaiton.yml that I don't like to have. application.yml sftp: host: 10.10.128.128 user: ftpuser1 password: ftpuser1password path: /tmp/inputfile/test1 Spring Boot Apache Camel Route: @Value("${sftp.user}") private String sftpUser; @Value("$

Spring Boot properties usage in Apache Camel route

痴心易碎 提交于 2020-04-13 07:30:53
问题 Is this possible to use Spring Boot properties in Apache Camel route? @Value is working fine but is this possible to directly place in place holders of expressions. Update: I know PropertiesComponent but which will be one more configuration apart from Applicaiton.yml that I don't like to have. application.yml sftp: host: 10.10.128.128 user: ftpuser1 password: ftpuser1password path: /tmp/inputfile/test1 Spring Boot Apache Camel Route: @Value("${sftp.user}") private String sftpUser; @Value("$

How to addAttachment on Camel 3.0

老子叫甜甜 提交于 2020-04-12 07:10:47
问题 in Camel 2.x I could add an Attachment to a Message like: exchange.getOut().addAttachment("LogFile.log.gz", new DataHandler(Base64.decodeBase64(FileContentBase64),"application/x-gzip")); But in Camel 3.0 it is not possible. I change my code like the migration guide says: exchange.getMessage().addAttachment("LogFile.log.gz", new DataHandler(Base64.decodeBase64(FileContentBase64),"application/x-gzip")); But it is not working. Also this not: exchange.getIn().addAttachment("LogFile.log.gz", new

Unable to read a barcode using apache camel

我们两清 提交于 2020-02-25 22:27:58
问题 Hi i have tried to read a barcode from image using below code but i am unable to read the file as it contains multiple barcodes. Is there any work around for this? @GetMapping(value = "OCR/Apachecamel") @ApiOperation(value = "Get result from Barcode Apachecamel library") public BarcodeInfo GetApachecamelResult() throws Exception { try { InputStream barCodeInputStream = new FileInputStream("images/multiple.png"); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer( new

Unable to read a barcode using apache camel

大兔子大兔子 提交于 2020-02-25 22:27:17
问题 Hi i have tried to read a barcode from image using below code but i am unable to read the file as it contains multiple barcodes. Is there any work around for this? @GetMapping(value = "OCR/Apachecamel") @ApiOperation(value = "Get result from Barcode Apachecamel library") public BarcodeInfo GetApachecamelResult() throws Exception { try { InputStream barCodeInputStream = new FileInputStream("images/multiple.png"); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer( new

Springboot Rest Api parameter encrypt by using apache camel

自古美人都是妖i 提交于 2020-02-15 06:45:48
问题 I want to encrypt rest api path parameter in apache camel(springboot) spring dsl . I have tried different methods using crypto dataformat on camel but it was not working. I have added camel crypto 2.14.0 I am new in this technology.i know the below code is wrong. I tried Below code <route streamCache="true" trace="true" errorHandlerRef="globalErrorHandler"> <from uri="direct:getCustomerPortfolio" /> <to uri="direct-vm:routeProcessor" /> <setHeader headerName="CamelHttpMethod"><constant><

Springboot Rest Api parameter encrypt by using apache camel

老子叫甜甜 提交于 2020-02-15 06:45:48
问题 I want to encrypt rest api path parameter in apache camel(springboot) spring dsl . I have tried different methods using crypto dataformat on camel but it was not working. I have added camel crypto 2.14.0 I am new in this technology.i know the below code is wrong. I tried Below code <route streamCache="true" trace="true" errorHandlerRef="globalErrorHandler"> <from uri="direct:getCustomerPortfolio" /> <to uri="direct-vm:routeProcessor" /> <setHeader headerName="CamelHttpMethod"><constant><

Springboot Rest Api parameter encrypt by using apache camel

旧时模样 提交于 2020-02-15 06:45:45
问题 I want to encrypt rest api path parameter in apache camel(springboot) spring dsl . I have tried different methods using crypto dataformat on camel but it was not working. I have added camel crypto 2.14.0 I am new in this technology.i know the below code is wrong. I tried Below code <route streamCache="true" trace="true" errorHandlerRef="globalErrorHandler"> <from uri="direct:getCustomerPortfolio" /> <to uri="direct-vm:routeProcessor" /> <setHeader headerName="CamelHttpMethod"><constant><

Unable to set SOAP Header while calling Web Service through Camel using dataFormat as POJO

岁酱吖の 提交于 2020-02-08 07:38:43
问题 I am using Camel in our project and requesting WebServices, the dataFormat is POJO. I was able to request when my SOAP message did not contain SOAP headers, but when it had Headers, I was unable to set those. I looked at the documentation but was not able to understand and have several questions. I want to create a message like the below: <soapenv:Envelope`enter code here` xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http:/