apache-camel

Camel JMS - Unable to set JMSPriority to IBM MQ Message

守給你的承諾、 提交于 2020-01-06 02:28:13
问题 We are trying to send JMS text message over IBM mq using Apache Camel. We are able set few JMS header properties except the JMSPriority. We tried setting int value and used resultType="java.lang.Integer" but unable to alter priority. Any clue would be more than helpful. <route id="mqSender"> <from uri="direct:mqSender"></from> <filter> <simple> ${body} != null</simple> <setProperty propertyName="originalRequest"> <simple> ${body}</simple> </setProperty> <setHeader headerName="JMSCorrelationID

IN clause in Apache Camel 2.18

我与影子孤独终老i 提交于 2020-01-05 07:10:36
问题 I am trying to execute a sql deletion statement within the route. The query contains an IN clause and I want to pass a Set of values to the IN clause. I am using camel-core & camel-jdbc 2.18.1 and camel-sql 2.18.0 from("direct:deleteRoute").setBody(simple("DELETE FROM TABLE_NAME WHERE ID IN (:#in:idSet)")).to(Constants.JDBC_DATA_SOURCE).end(); Value for idSet is passed in the header of the exchange with key idSet from the route, which calls direct:deleteRoute . But when I execute I get the

Effect of ExchangePattern.InOnly on mq endpoint

拈花ヽ惹草 提交于 2020-01-05 06:56:08
问题 I have my route defined as from("jetty:http://0.0.0.0:xxxx/abc").to("activemq:queue:queue1").setExchangePattern(ExchangePattern.InOnly); I understand that this route drops a meessage to the broker and does not wait for the message consumer to consume it. I want to understand the impact of ExchangePattern.InOnly with respect to broker accepting message. I have persistence enabled on the broker. Does the above route ensure that it is persisted before the exchange is completed. 回答1: You need to

Apache Camel Proxy isn't working

折月煮酒 提交于 2020-01-05 05:57:46
问题 Issue might be related to my understanding of the concept too. ActionClass is invoking proxy bean which is AccountingInterface . Proxy bean interface is implemented with AccountingUtil class. So I am expecting xml returned by AccountingUtil to be passed through seda:accountingQueue and then streamed out on console. ApplicationContext <bean id="accountingInterface" class="org.apache.camel.spring.remoting.CamelProxyFactoryBean"> <property name="serviceUrl" value="seda:accountingQueue"/>

Apache Camel: ProducerTemplate not unmarshalling the response

流过昼夜 提交于 2020-01-05 03:33:30
问题 Camel version: 2.15.6 I used the ProducerTemplate to send a http request and get the response like this. from("direct:getContact") .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { CamelContext context = exchange.getContext(); ProducerTemplate producerTemplate = context.createProducerTemplate(); Contact contact = producerTemplate.requestBodyAndHeaders( "http://localhost:8080/api/contact/2345", null, headers, Contact.class); logger.info("Contact is:

Passing uniform webservices through Camel

五迷三道 提交于 2020-01-04 14:12:22
问题 I'm contemplating using Camel for my project and would like to know if it's feasable or camel is not a good choice. I need multiple clients running same exact application to exchange information via web services (CXF or AXIS). The exchange will go through a central hub that will do a content based routing from one client to the other and will also log this communication in the database. The hub will also route one client's response to another when the responses come in. There could be a large

Apache Camel - Build both from and to endpoints dynamically

霸气de小男生 提交于 2020-01-04 07:11:50
问题 I have a camel route which processes a message from a process queue and sends it to upload queue . from("activemq:queue:process" ).routeId("activemq_processqueue") .process(exchange -> { SomeImpl impl = new SomeImpl(); impl.process(exchange); }) .to(ExchangePattern.InOnly, "activemq:queue:upload"); In impl.process I am populating an Id and destination server path . Now I need to define a new route which consumes messages from upload queue ,and copy a local folder (based on Id generated in

Apache Camel - Build both from and to endpoints dynamically

谁说我不能喝 提交于 2020-01-04 07:11:08
问题 I have a camel route which processes a message from a process queue and sends it to upload queue . from("activemq:queue:process" ).routeId("activemq_processqueue") .process(exchange -> { SomeImpl impl = new SomeImpl(); impl.process(exchange); }) .to(ExchangePattern.InOnly, "activemq:queue:upload"); In impl.process I am populating an Id and destination server path . Now I need to define a new route which consumes messages from upload queue ,and copy a local folder (based on Id generated in

Cannot consume from http endpoint

懵懂的女人 提交于 2020-01-03 15:35:21
问题 My route is given below i am trying to exchange data using HTTP component , the URI contains submit data and get in response should get an data but its not working <route> <from uri="http://gatest.dnb.com/daasaccess/scripts/broker.asp?request=%3C%3Fxml+version%3D%271.0%27+encoding%3D%27UTF-8%27%3F%3E%3CDGX%3E%3CSIGNONMSGSRQV1%3E%3CSONRQ%3E%3CDTCLIENT%3E2007-05-04%3C%2FDTCLIENT%3E%3CUSERID%3Esalesautomation%3C%2FUSERID%3E%3CUSERPASS%3ESFAAdmin%3C%2FUSERPASS%3E%3CLANGUAGE%3EEN%3C%2FLANGUAGE%3E

Cannot consume from http endpoint

你离开我真会死。 提交于 2020-01-03 15:35:08
问题 My route is given below i am trying to exchange data using HTTP component , the URI contains submit data and get in response should get an data but its not working <route> <from uri="http://gatest.dnb.com/daasaccess/scripts/broker.asp?request=%3C%3Fxml+version%3D%271.0%27+encoding%3D%27UTF-8%27%3F%3E%3CDGX%3E%3CSIGNONMSGSRQV1%3E%3CSONRQ%3E%3CDTCLIENT%3E2007-05-04%3C%2FDTCLIENT%3E%3CUSERID%3Esalesautomation%3C%2FUSERID%3E%3CUSERPASS%3ESFAAdmin%3C%2FUSERPASS%3E%3CLANGUAGE%3EEN%3C%2FLANGUAGE%3E