apache-camel

Websphere Liberty profile - transacted Websphere MQ connection factory

☆樱花仙子☆ 提交于 2020-01-02 04:47:07
问题 Trying to get my Liberty profile server to create a transacted jmsConnectionFactory to my instance of Websphere message queue. Liberty profile v 8.5.5.5 Websphere MQ 7.x I've tried to change the jmsQueueConnectionFactory to jmsXAQueueConnectionFactory but it does not help -> Then it seems to just ignore it and doesn't connect to the MQ server.xml <?xml version="1.0" encoding="UTF-8"?> <server description="new server"> <!-- Enable features --> <featureManager> <feature>wmqJmsClient-1.1<

How to delay consuming messages in Apache Camel from ActiveMQ

风流意气都作罢 提交于 2020-01-01 17:56:12
问题 I have a requirement where I need to throttle by shaping (queuing) inbound traffic when client app sends more than 1000 requests in a 5 sec time span. The solution I followed is: I have a camel:throttle setting max requests to 1000 and timespan to 5 sec. When threshold is exceeded I am catching throttle exception and within the onException block, I am sending the throttled messages to an ActiveMQ request queue for further processing later as Camel is overloaded based on 1000 req/ 5 sec config

REST service call with Camel which requires authentication api called first

自作多情 提交于 2020-01-01 08:49:51
问题 Camel has to call REST service for some integration, However, the REST service has one authentication api (POST api) which needs to be called first to get a token and then other subsequent api calls has to be invoked with the token embedded in header of HTTP requests. Does Spring Restemplate or apache camel has some api to support the same? 回答1: Followed @gusto2 approach, Its pretty much working fine. SO, I created two routes --> First one is a timer based like below, this generates the token

How can I log a header value in camel using spring DSL

拟墨画扇 提交于 2020-01-01 04:27:28
问题 This seems like it should be simple, pardon the pun. I'm trying to log a header in camel within a spring DSL route. I've seen the answer for Java DSL but I've been searching in vain for how to make it work in spring DSL. I've tried: <log message="ftping $simple{header.CamelFileName}"/> and also: <log message="ftping ${header.CamelFileName}"/> and several other permutations/variations, but all of them simply log that text verbatim (i.e. they do not substitute the actual header name). What am I

How in Camel to add and start routes dynamically?

非 Y 不嫁゛ 提交于 2020-01-01 03:11:09
问题 I'm trying to remove some boilerplate from routes in Camel. For example, let's consider the two routes, which are similar and most of their inner stuff could be generated. I've created a component "template", which creates TemplateEndpoint , and modifyed an XML config to use the template component. A custom method TemplateEndpoint.generateRoute (adding route definitions) is being called from StartupListener (defined in TemplateEndpoint.setSuffix ). So while Camel context starting, route

Camel Routes and Endpoints

安稳与你 提交于 2019-12-31 19:29:14
问题 I've been poring over the Apache Camel docs trying to get a concrete understanding of two of its most basic concepts (endpoints and routes), and although these terms are used everywhere throughout the docs, I can find no reference that actually defines what they are and what they are used for. And although their names are fairly obvious-sounding, and I think I understand what they are, I've now been assigned to a task that has landed me neck-deep in Apache Camel Land, and its absolutely vital

How to get Camel FTP to fetch only once on demand

女生的网名这么多〃 提交于 2019-12-31 06:00:11
问题 I'm fairly new to Camel. I've been trying to get Camel to fetch a single file via FTP only once, on demand. I couldn't get it to work. Here is what I've tried. Let me know what is the best approach and what is wrong with my code. 1- Send an empty message after the file was read and when the empty message is received, stop the route. from("direct:myStart") .routeId("routeA") .pollEnrich("ftp:...disconnect=true&sendEmptyMessageWhenIdle=true") .choice() .when(body().isNull()).process

How to get Camel FTP to fetch only once on demand

邮差的信 提交于 2019-12-31 06:00:11
问题 I'm fairly new to Camel. I've been trying to get Camel to fetch a single file via FTP only once, on demand. I couldn't get it to work. Here is what I've tried. Let me know what is the best approach and what is wrong with my code. 1- Send an empty message after the file was read and when the empty message is received, stop the route. from("direct:myStart") .routeId("routeA") .pollEnrich("ftp:...disconnect=true&sendEmptyMessageWhenIdle=true") .choice() .when(body().isNull()).process

fetch specific set of records for each poll without setting the flag in camel

三世轮回 提交于 2019-12-31 05:29:15
问题 I need to pick all the messages from db and send it for reprocessing. my main requirement is i should fetch only certain number of records for each poll and not all the records. next poll should get me next set of records and set it for processing. i should not use processedFlag column in the table - this is not allowed. I am free to use any camel component such as jpa, sql , jdbc etc., Help is greatly appreciated. 回答1: You could use the Batch Consumer as described here - https://camel.apache

Apache Camel - IBM MQ integration

十年热恋 提交于 2019-12-31 04:15:15
问题 I have a Apache camel (version 2.18) project that sends a file to my partner's IBM MQ server by IBM MQ client. However, my partner uses the messageId as the filename, thus, we have to set specific filename to messageId . My question is how we can change the messageId ? I tried to add JMS_IBM_MQMD_MsgId or MsgId or modify the JMSMessageId in JMS header before I send the file to the IBM MQ server, but it doesn't work. Do you have any solution? Here is the code in spring file. For example,