Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread raffi
But is the error sufficient to force Camel to shutdown? I assume it is given the resource, in this case, is no different than memory; if there's none left, the process cannot continue. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshol

Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread raffi
I believe you are right, just found likely problem: camel-salesforce connector, too many open file handles, a bit odd the exception is a WARNing, not a ERROR. On RHEL 7.2/Java 1.8/Camel 2.15.1 -- ulimit -n 1024 (just before process shuts down) lsof -i TCP -p | grep TCP | wc -l

Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread raffi
Claus, I'm asking because something is shutting down our route process in production, and we cannot determine what's doing it. We observe this happening under high load situations. Do any Camel endpoints have a default setting that automatically stops the context? I would think not but I figured I

Re: NullPointer. org.apache.camel.component.jms.DefaultJmsMessageListenerContainer

2017-02-02 Thread raffi
Please post spring bean config -- View this message in context: http://camel.465427.n5.nabble.com/NullPointer-org-apache-camel-component-jms-DefaultJmsMessageListenerContainer-tp5788071p5793367.html Sent from the Camel - Users mailing list archive at Nabble.com.

How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread raffi
Is there any endpoint in Camel, either seda, direct, activemq, jpa, or splitter, that automatically shuts down the context if a setting on the endpoint is exceeded? -- View this message in context: http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshold-exceeded-tp57

Camel consumers created/destroyed every second...

2017-01-06 Thread raffi
I'm using the following configuration with Springboot 1.4/Java 1.8, Camel 2.15.1. In JMX I can see 8 consumers objects on the listening queue, but the consumers are replaced with new ones, verified by session ID, every second. This started happening the moment I changed from CACHE_CONSUMER/prefetc

Re: Camel consumers created/destroyed every second...

2017-01-06 Thread raffi
Ahhh, need to OPEN MY EYES! ...CACHE_CONSUMER/prefetch=1, mistake was disabling consumer caching entirely. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-consumers-created-destroyed-every-second-tp5792215p5792217.html Sent from the Camel - Users mailing list archive at

Re: Dynamic Router: forwarding and tracking

2016-12-17 Thread raffi
Thanks for the reply; so explicit routing back to the dynamic router should be avoided, is that what you're saying? This would probably explain why I'm seeing duplicate debugging output. -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-Router-forwarding-and-tracking-

Dynamic Router: forwarding and tracking

2016-12-12 Thread raffi
Trying to understand Dynamic Router, docs are somewhat confusing. Anyway, assuming this *Router*... from("seda:router") .dynamicRouter(method(Slip.class, "slip")); ..and this *Slip* generator: int invoked = 0; public String slip(String body) { if (invoked == 0) { invoked++;

Why does JPA batch update rollback transaction on single record failure?

2016-07-03 Thread raffi
We're using the following to aggregate messages containing objects bound for JPA/Hibernate endpoint. The problem we have is managing failures; if a single record fails, the entire batch rolls back, and it's difficult to identify which record actually failed. Would be nice if BatchUpdateException w

Re: Combining TimeoutAwareAggregationStrategy and AbstractListAggregationStrategy

2016-07-02 Thread raffi
Try this; completes when total aggregate size exceeds 75, or 10 seconds elapses, whichever comes first. true -- View this message in context: http://camel.465427.n5.nabble.com/Combining-TimeoutAwareAggregationStrategy-and-Abstr

Camel Salesforce, safe to remove XStream annotations from velocity templates?

2016-06-29 Thread raffi
We're using Camel Salesforce Maven plugin for generating DTOs. Services using the DTOs use JSON exclusively, no XML, so we customized velocity templates with JsonProperty(), JsonInclude, etc., annotations; works great with Jackson. My question: is it safe to remove XStream annotations from the temp

Camel JPA batch insert; exception handling on single bad record.

2016-06-11 Thread raffi
Using Camel 2.15.1, aggregator to JPA endpoint for batching inserts of 75 records (or every 10s). This approach works fine, downside is when database chokes on single bad record, entire batch is rolled-back. We catch DataException with original list of records with the goal of removing the bad reco

Aggregator with JPA timeout forcing transactions every 5 seconds

2016-04-06 Thread raffi
Camel 2.15.1, using aggregator2 with JPA endpoint, the timeout appears to be forcing hibernate to increment the transaction count every 5 seconds, even if the agreggator is empty; is that normal? true

Call bean method with argument type Class using Simple expression

2016-04-03 Thread raffi
My routes use a bean for utility functions... public void setSerializationType(Exchange ex, Class clazz) { ... } I've tried calling the method using Simple expressions, but Camel always complains it's unable to bind the Class parameter; is this even possible? Based on documentation, Stri

Camel depends on Spring bean

2016-04-02 Thread raffi
My routes depend on a Spring bean that must be initialized before use. I'm using Spring *PostConstruct* and Camel's *depends-on*, seems to work fine, want to make sure it's a valid approach... @PostConstruct public void init(){ ... } -- View this message in context: http://camel.465427.

Re: Camel JPA consumer causing Out of Memory when polling table

2016-03-31 Thread raffi
Figured it out, forgot to set maximumResults on poller, http://camel.465427.n5.nabble.com/Camel-JPA-consumer-causing-Out-of-Memory-when-polling-table-tp5780168p5780197.html Sent from the Camel - Users mailing list archive at Nabble.com.

Camel JPA consumer causing Out of Memory when polling table

2016-03-31 Thread raffi
Curious if anyone can shed light on this... Using Camel JPA to poll Oracle. On startup, high CPU and memory consumption is observed; profiler shows oracle driver spending A LOT of time in getColumnIndex(), not much else, ultimately causes OOM. Camel 2.15.3/Java 8/RHEL 7.1 2016-03-31 07:40:35,95

Seda concurrent consumers with aggregator

2016-03-30 Thread raffi
Is it valid to concurrently process messages into an aggregator? There is no mention of "aggregator" in Camel docs for parallel processing, want to be sure. true -- View this message in context: http://camel.465427.n5.nabble.com/

Re: Camel JMS, what is a "task" in maxMessagesPerTask?

2016-03-27 Thread raffi
Ahh, ok, thanks Claus. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-what-is-a-task-in-maxMessagesPerTask-tp5779819p5779822.html Sent from the Camel - Users mailing list archive at Nabble.com.

Camel JMS, what is a "task" in maxMessagesPerTask?

2016-03-27 Thread raffi
While not explicitly mentioned in Camel JMS docs, I'm assuming "task" is a thread, so *maxMessagesPerTask=5* limits the number of messages on which a thread can operate; is that correct? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-what-is-a-task-in-maxMessagesPe

Re: Camel route ACtiveMQ to ActiveMq has low transactions per second

2016-03-27 Thread raffi
e") .to("test-jms2:queue:test2.queue"); } }); I was able to send thousands of messages in just a few seconds with those optimizations alone, Hope it helps Raffi -- View this message in context: http://camel.465427.n5.nabble

Camel JPA batch INSERT example with collection or list

2016-03-22 Thread raffi
Looking for an example showing how to INSERT collection or list of objects using Camel JPA endpoint. I read somewhere (can't find link) if the type argument for JPA is Collection, JPA automatically performs a batch INSERT on the objects in the list; is that accurate? -- View this message in

Cache level for non-transacted producers, activemq?

2016-03-21 Thread raffi
I'm using CACHE_CONSUMER for concurrent queue consumers (non-transacted), that works fine. For producers, what should the cache level be assuming non-transacted sessions? Is CACHE_SESSION ok? I want to avoid creating/destroying sessions for each send operations. I've configured separate connectio

Re: Shutdown sequence when running Camel in Springboot

2015-12-10 Thread raffi
Nevermind, figured it out from this article: http://www.javacodegeeks.com/2014/10/spring-boot-actuator-custom-endpoint-with-mvc-layer-on-top-of-it.html -- View this message in context: http://camel.465427.n5.nabble.com/Shutdown-sequence-when-running-Camel-in-Springboot-tp5774960p5774974.html

Re: Shutdown sequence when running Camel in Springboot

2015-12-10 Thread raffi
Yeah, I see that working now, just POST to "/shutdown" and springboot shuts everything down, including Camel. The problem with SB's shutdown endpoint is, although it stops Camel first, then the JVM, the initial request to `/shutdown` returns immediately, but the time between the request and when t

Shutdown sequence when running Camel in Springboot

2015-12-10 Thread raffi
With respect to graceful shutdown, does Springboot hook into Camel such that invoking Springboot's standard "/shutdown" endpoint automatically shuts down Camel first, then the JVM? Trying to understand if explicit shutdown hooks are requried. Best Raffi -- View this message in

Re: Shutdown hook in FatJarRouter - Springboot

2015-12-09 Thread raffi
After some more digging, here's what I found. Invoking stop() on camel context shuts down all routes gracefully as per the log, but two problems I'm seeing after routes are shut down is (I believe) the cause for JVM not shutting down: #1) ActiveMQ connection remains open #2) AbstractInactivityMo

Shutdown hook in FatJarRouter - Springboot

2015-12-09 Thread raffi
icsExecutor' bean manually? @ImportResource(value={"classpath:META-INF/spring/camel-context.xml"}) @SpringBootApplication public class MySpringBootRouter extends FatJarRouter { public static void main(String[] options){ MySpringBootRouter router = new MySpringBootRouter(); } } R

Re: Setting timeout in Springboot

2015-12-09 Thread raffi
Figured it out, bean id="shutdown" class="org.apache.camel.impl.DefaultShutdownStrategy" -- View this message in context: http://camel.465427.n5.nabble.com/Setting-timeout-in-Springboot-tp5774874p5774876.html Sent from the Camel - Users mailing list archive at Nabble.com.