apache-camel

ActiveMQ Consumer Hangs

爱⌒轻易说出口 提交于 2019-12-18 12:02:41
问题 I have an activeMQ broker using an SSL transport. I have about 10 consumers that are using the broker. I am using camel to configure my routes. Every so often, it hangs up and will not consume new messages, even if I restart the consumers, even though there are messages pending in the queues. I started trying to isolate where this was happening by stepping through my consumers one at a time trying to replicate the problem. I finally got to a consumer that I could re-create the problem on. It

ActiveMQ Consumer Hangs

廉价感情. 提交于 2019-12-18 12:02:07
问题 I have an activeMQ broker using an SSL transport. I have about 10 consumers that are using the broker. I am using camel to configure my routes. Every so often, it hangs up and will not consume new messages, even if I restart the consumers, even though there are messages pending in the queues. I started trying to isolate where this was happening by stepping through my consumers one at a time trying to replicate the problem. I finally got to a consumer that I could re-create the problem on. It

How can Apache Camel be used to monitor file changes?

六月ゝ 毕业季﹏ 提交于 2019-12-18 03:57:13
问题 I would like to monitor all of the files in a given directory for changes, ie an updated timestamp. This use case seems natural for Camel using the file component, but I can't seem to find a way to configure this behavior. A uri like: file:/some/directory will consume the files in the provided directory but will delete them. A uri like: file:/some/directory?noop=true consumes each file once when it is added or when the route is started. It's surprising that there isn't an option along the

Apache Camel producers and consumers

那年仲夏 提交于 2019-12-17 21:55:37
问题 I have difficulties wrapping my head around the concept. I am trying to implement an endpoint that listens on a tcp port for incoming messages in a proprietary format, which would then transform the message and have camel take over the forwarding and routing. Did I understand correctly that that the Producer is responsible for sending messages into the Endpoint and the Consumer receives them from that endpoint? When studying the interfaces I couldn't figure out the message flow between those

Spring Boot Apache Camel Routes testing

纵饮孤独 提交于 2019-12-17 20:43:06
问题 I have a Springboot application, where I have some camel routes configured. public class CamelConfig { private static final Logger LOG = LoggerFactory.getLogger(CamelConfig.class); @Value("${activemq.broker.url:tcp://localhost:61616}") String brokerUrl; @Value("${activemq.broker.maxconnections:1}") int maxConnections; @Bean ConnectionFactory jmsConnectionFactory() { PooledConnectionFactory pooledConnectionFactory = new PooledConnectionFactory(new ActiveMQConnectionFactory(brokerUrl));

Caused by: java.net.SocketException: Unexpected end of file from server

陌路散爱 提交于 2019-12-17 18:58:06
问题 I am getting the below error quite intermittently when i run the WS through SOAP UI. Sometimes it does not work and then it keeps working and then again sometimes it does not work. One other issue is the test web service works fine provided by client with no issues but moment we switch to the production one it gives issues. Googled and did some changes (timeout on HttpConfig , jetty maxIdleTime) but still cant make it work :( Any ideas how i can narrow down what the issue is ? org.apache.cxf

Apache Camel and other ESB products

。_饼干妹妹 提交于 2019-12-17 17:24:53
问题 Hey, If we have Apache Camel why to use other solutions like Apache ServiceMix and Mule? Is there something Apache Camel can't do comparing to these products? When to use Mule/ServiceMix and when to use Camel? 回答1: Apache Camel is a library that implements enterprise integration patterns (EIP). While it can use Spring as its IOC framework, it is not even dependent upon Spring, so it is completely platform independent. It is "just" a library. So you can run it any JVM environment, e.g. simple

Add camel route at runtime in Java

 ̄綄美尐妖づ 提交于 2019-12-17 10:42:50
问题 How can I add a camel route at run-time in Java? I have found a Grails example but I have implement it in Java. My applicationContext.xml already has some predefined static routes and I want to add some dynamic routes to it at run time. Is it possible? Because the only way to include dynamic route is to write the route.xml and then load the route definition to context. How will it work on existing static routes? Route at runtime 回答1: you can simply call a few different APIs on the

Camel routing based on object value

三世轮回 提交于 2019-12-14 03:57:17
问题 I have two simple Camel routes working for writing to a jms queue and reading from it. I am putting a serialized object to the queue. I am able to deserialize it and covert it to json successfully. Route for writing: from("direct:message").to("jms:myqueu") My route for reading: from("jms:myqueu") .marshal() .json(JsonLibrary.Gson). .to("file://cc") Now i want to check a field within the object and route based on that. Also that field should not be part of the final json. Can i check the value

Camel ShutdownStrategy: Inflight Messages do not decrease

ε祈祈猫儿з 提交于 2019-12-14 03:19:01
问题 I am using the default shutdown strategy in my camelcontext. The route starts with a rabbitmq consumer which is consuming from a queue with more than 10k messages. When I stop the route, the consumer keeps on consuming new messages from the queue. Hence the inflight exchange count never decrements and the route waits for shutdown until the default timeout value(300s). Is there any way to change this behaviour? Basically stop the rabbitmq consumer from consuming new messages when shutdown is