apache-camel

camel jetty benchmark testing for requests per second

一个人想着一个人 提交于 2019-12-11 13:08:18
问题 I am building a high load http service that will consume thousands of messages per second and pass it to a messaging system like activemq. I currently have a rest service (non-camel, non-jetty) that accepts posts from http clients and returns a plain successful respone and i could load test this using apache ab. We are also looking at camel-jetty as input endpoint since it has integration components for activemq and be part of an esb if required. Before i start building a camel-jetty to

spring-redis can't connect to remote host

前提是你 提交于 2019-12-11 12:59:24
问题 I have the following camel which polls Redis: from("timer://pollredis?fixedRate=true&period=5") // poll redis .setHeader("CamelRedis.Command", constant("LPOP")) .setHeader("CamelRedis.Key", constant("shipments")) // from redis, it is a producer, fetch with .to() ! .to(redisUri) // .choice().when(simple("${in.body} == null")).stop().otherwise() // .to("direct:internal").end(); JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory(); jedisConnectionFactory

Converting HL7 v2 to JSON

有些话、适合烂在心里 提交于 2019-12-11 12:50:06
问题 I am looking to convert HL7 v2 (older EDI format) messages to JSON, so I could make them processable under Apache Drill and compressible under Parquet. I looked into HAPI, but I am not having luck finding utility for non-XML HL7 to JSON conversion. Does anyone have a suggestion or a reference to a library? 回答1: Just use HAPI to convert to XML. The code below requires Saxon, because the XML-to-JSON requires XSLT 2.0, but if you already have a method to convert XML to JSON, then you just need

Apache Camel - how to use InputStream as source?

与世无争的帅哥 提交于 2019-12-11 12:06:28
问题 What I'm trying to do seems simple enough, or at least a common task. The fact that I'm unable to find any examples, however, tells me I'm going about this the wrong way. I have an InputStream I need to use as a source. The InputStream provides lines of text that I need to route to one or more destination endpoints. The source of the InputStream is a bit of a black box - it's not from a file or a URL. I have the most basic of stream examples working...using System.in and System.out: public

Camel JPA Component - forcing a commit

若如初见. 提交于 2019-12-11 11:49:48
问题 I have a Camel route which looks like this: <routeContext id="rollover-route" xmlns="http://camel.apache.org/schema/spring"> <route id="pickUpEntries"> <from uri="jpa://cameltest.model.CamelTest?consumer.namedQuery=unconsumedEntries&?consumeDelete=false&persistenceUnit=persistenceProvider&consumeLockEntity=true"/> <split executorServiceRef="rolloverProfile"> <simple>${body}</simple> <setProperty propertyName="taskId"> <simple>${body.taskId}</simple> </setProperty> <setProperty propertyName=

Apache camel bindy - how to log or debug

落花浮王杯 提交于 2019-12-11 11:37:58
问题 I'm trying to get some log informations from camel bindy. I had a working setup using an BindyCsvDataFormat bindyProduct with an annotated product-bean and an csv file as source. Now I changed the CSV file and the annotated bean. The processing seams to get stuck within the bindy processor, but I do not get any Informations/logs. My debugProcessor is not reached at all. If I put it before the unmarshal step, then it logs some stuff and I can debug into it. I wonder why the new files do not

How can I implement an OAuth flow in a CXF endpoint (SOAP) in Camel (preferably Blueprint)?

╄→尐↘猪︶ㄣ 提交于 2019-12-11 11:35:13
问题 I would like to address a SOAP web service via camel-cxf endpoint . How can I implement an OAuth flow , preferably in the blueprint? Is that configurative or do I have to implement it myself? 回答1: I have found nice documentation on this: Basically, you have to implement interceptors and filters: Your blueprint.xml <bean id="tvServiceClientFactory" class="org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean"> <property name="address" value="http://localhost:${http.port}/services/oauth/validate"/

Apache Camel iterate over List

佐手、 提交于 2019-12-11 11:28:58
问题 I am new to Apache Camel and I am having problems understanding how to implement a simple integration task: A REST service is calling a Spring Bean through Apache Camel route Spring Bean returns a collection of classes (ArrayList) I need to iterate over each item in the collection and convert it to another type through the custom converter. It seems that I should use Split and an Aggregator, but how do I constraint Aggregator to consume all items from the original list, not more, nor less.

Camel rest dsl json contains escape sequence

余生颓废 提交于 2019-12-11 11:06:36
问题 I need help with Camel. I prepared some rest service, but I have small problem with response. My response contains escape sequence before ". Could anyone help me with this problem? My configuration: restConfiguration().port("{{rest_port}}").component("jetty").host("localhost").bindingMode(RestBindingMode.json); rest("/login").post().bindingMode(RestBindingMode.json).produces("application/json").consumes("application/json").to("direct:login-rest"); from("direct:login-rest") .choice() .when

camel splitter parallel processing

别来无恙 提交于 2019-12-11 11:05:10
问题 We have a service call which returns a list of ids with which we call another service which takes only one id at a time, so we are using the camel splitter with parallel processing turned to true . Now the call we make for the service is through a seda so we can put a timeout on it. This will cause the problem that parallel processing will not be parallel anymore since seda by default has only 1 concurrent consumers working on it. Options: put a ?concurrentConsumers=x on the seda use direct