You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by rwijngaa <ri...@gmail.com> on 2015/02/12 15:09:51 UTC

camel-jdbc reading from H2 @ less than 1 message per second?

Hi,

i'm using camel-jdbc (camel 2.12.0) to read 1000+ records from a H2 database
(reading per 100), but i'm seeing a low performance of <1 message per
second. In the logging i see something like:

"Received: 1 new messages, with total 11 so far. Last group took: 10000
millis which is: 0.1 messages per second. average: 0.101"

*My (Camel route:*
    <camelContext id="databaseTestContext"
xmlns="http://camel.apache.org/schema/spring"  trace="true">
        <route>
            <from uri="timer://kickoff?period=10s" />
            <to
uri="log:test?level=INFO&amp;groupInterval=10000&amp;groupDelay=10000&amp;groupActiveOnly=false"
/>
            <setBody>
                <constant>select * from databasetest</constant>
            </setBody>
            <to
uri="jdbc:testDataSource?readSize=100&amp;statement.maxRows=100&amp;statement.fetchSize=100&amp;resetAutoCommit=false"
/>
            <split>
               <simple>${body}</simple>
               <to uri="mock:result"/>
            </split>
        </route>
    </camelContext>


testDataSource is an osgi reference to a H2 Datasource like so:
<osgi:reference id="testDataSource" interface="javax.sql.DataSource"
filter="(datasource.name=testH2Database)" cardinality="1..1" />

Any ideas?

Regards
Rino






--
View this message in context: http://camel.465427.n5.nabble.com/camel-jdbc-reading-from-H2-less-than-1-message-per-second-tp5762651.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-jdbc reading from H2 @ less than 1 message per second?

Posted by rwijngaa <ri...@gmail.com>.
Ah, my bet. Indeed, better results now ;-)



--
View this message in context: http://camel.465427.n5.nabble.com/camel-jdbc-reading-from-H2-less-than-1-message-per-second-tp5762651p5762662.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-jdbc reading from H2 @ less than 1 message per second?

Posted by Claus Ibsen <cl...@gmail.com>.
Your are having the logger the wrong place, put the logger inside the splitter

On Thu, Feb 12, 2015 at 3:09 PM, rwijngaa
<ri...@gmail.com> wrote:
> Hi,
>
> i'm using camel-jdbc (camel 2.12.0) to read 1000+ records from a H2 database
> (reading per 100), but i'm seeing a low performance of <1 message per
> second. In the logging i see something like:
>
> "Received: 1 new messages, with total 11 so far. Last group took: 10000
> millis which is: 0.1 messages per second. average: 0.101"
>
> *My (Camel route:*
>     <camelContext id="databaseTestContext"
> xmlns="http://camel.apache.org/schema/spring"  trace="true">
>         <route>
>             <from uri="timer://kickoff?period=10s" />
>             <to
> uri="log:test?level=INFO&amp;groupInterval=10000&amp;groupDelay=10000&amp;groupActiveOnly=false"
> />
>             <setBody>
>                 <constant>select * from databasetest</constant>
>             </setBody>
>             <to
> uri="jdbc:testDataSource?readSize=100&amp;statement.maxRows=100&amp;statement.fetchSize=100&amp;resetAutoCommit=false"
> />
>             <split>
>                <simple>${body}</simple>
>                <to uri="mock:result"/>
>             </split>
>         </route>
>     </camelContext>
>
>
> testDataSource is an osgi reference to a H2 Datasource like so:
> <osgi:reference id="testDataSource" interface="javax.sql.DataSource"
> filter="(datasource.name=testH2Database)" cardinality="1..1" />
>
> Any ideas?
>
> Regards
> Rino
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-jdbc-reading-from-H2-less-than-1-message-per-second-tp5762651.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/