You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Rafael Ponte <rp...@gmail.com> on 2015/02/21 03:03:39 UTC
Jpa Component: Difference between MaximumResults and
MaxMessagesPerPoll parameters
Hi Guys,
I'm using JPA Component and I'm not understanding the difference between
these two parameters: maximumResults and maxMessagesPerPoll.
If I set maximumResults=100 and maxMessagesPerPoll=20 it seems like
on every polling my query retrieves 100 entities from database but only 20
of them are processed by jpa-consumer. The next poll retrieves again more
100 entities instead of using the entities loaded previously.
So what's the meaning of using those two parameters together?
--
Rafael Ponte
TriadWorks | Formação Java
http://cursos.triadworks.com.br
--
Rafael Ponte
TriadWorks | Formação Java
http://cursos.triadworks.com.br
Re: Jpa Component: Difference between MaximumResults and
MaxMessagesPerPoll parameters
Posted by Rafael Ponte <rp...@gmail.com>.
Hi Claus,
Thanks for your help! I'll disable the maxMessagesPerPoll from now on.
On Saturday, February 21, 2015, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> maximumResults is JPA specific and you should favor using that as the
> JPA allows to optimize for this.
> maxMessagesPerPoll is a general option in camel batch consumers that
> allows to limit the number of rows from the batch the consumer will
> process at this poll.
>
> Dont use the together, use the maximumResults instead.
>
> On Sat, Feb 21, 2015 at 3:03 AM, Rafael Ponte <rponte@gmail.com
> <javascript:;>> wrote:
> > Hi Guys,
> >
> > I'm using JPA Component and I'm not understanding the difference between
> > these two parameters: maximumResults and maxMessagesPerPoll.
> >
> > If I set maximumResults=100 and maxMessagesPerPoll=20 it seems like
> > on every polling my query retrieves 100 entities from database but only
> 20
> > of them are processed by jpa-consumer. The next poll retrieves again more
> > 100 entities instead of using the entities loaded previously.
> >
> > So what's the meaning of using those two parameters together?
> >
> > --
> > Rafael Ponte
> > TriadWorks | Formação Java
> > http://cursos.triadworks.com.br
> >
> >
> > --
> > Rafael Ponte
> > TriadWorks | Formação Java
> > http://cursos.triadworks.com.br
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com <javascript:;>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>
--
Rafael Ponte
TriadWorks | Formação Java
http://cursos.triadworks.com.br
Re: Jpa Component: Difference between MaximumResults and
MaxMessagesPerPoll parameters
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
maximumResults is JPA specific and you should favor using that as the
JPA allows to optimize for this.
maxMessagesPerPoll is a general option in camel batch consumers that
allows to limit the number of rows from the batch the consumer will
process at this poll.
Dont use the together, use the maximumResults instead.
On Sat, Feb 21, 2015 at 3:03 AM, Rafael Ponte <rp...@gmail.com> wrote:
> Hi Guys,
>
> I'm using JPA Component and I'm not understanding the difference between
> these two parameters: maximumResults and maxMessagesPerPoll.
>
> If I set maximumResults=100 and maxMessagesPerPoll=20 it seems like
> on every polling my query retrieves 100 entities from database but only 20
> of them are processed by jpa-consumer. The next poll retrieves again more
> 100 entities instead of using the entities loaded previously.
>
> So what's the meaning of using those two parameters together?
>
> --
> Rafael Ponte
> TriadWorks | Formação Java
> http://cursos.triadworks.com.br
>
>
> --
> Rafael Ponte
> TriadWorks | Formação Java
> http://cursos.triadworks.com.br
--
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/