You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christopher Love <ch...@cnmconsulting.net> on 2012/05/29 05:29:36 UTC
Splitter Question - ArrayList
Hi all I am trying to split an ArrayList and send it to a queue.
I am not getting anything after the split. Ideas? What debug logging
should I tweak?
from("seda:ReloadLSADocs")
.to("clearHeader")
.validate(header("IGIVE_DOIT").isNotNull())
.routeId("reload-lsa-docs")
.to("bean:lsaRedisService?method=reloadLsaDocs")
.split(body(LsaResponse.class)) // after this nothing
.throttle(100)
.to("activemq:reloadLsa?concurrentConsumers=1000&asyncConsumer=true");
from("activemq:reloadLsa?concurrentConsumers=1000&asyncConsumer=true")
.to("log:com.igive.loaded?showBody=true")
.routeId("reload-lsa-docs-queue")
.to("log:com.igive.loaded?showBody=true")
.to("bean:redisRssService?method=lpushLsaHtml");
Thanks
Chris
--
Chris Love
clove@cnmconsulting.net
http://www.cnmconsulting.net
Calendar: http://j.mp/cnmCalendar
Follow me on twitter: @chrislovecnm
Re: Splitter Question - ArrayList
Posted by Henryk Konsek <he...@gmail.com>.
> I am not getting anything after the split. Ideas? What debug logging
> should I tweak?
Could you send us output from logger near
split(body(LsaResponse.class)) ? It's hard to tell what's wrong with
your routing, reasoning from the snippet we cannot execute locally and
seeing no log :) .
--
Henryk Konsek
http://henryk-konsek.blogspot.com
Re: Splitter Question - ArrayList
Posted by Christopher Love <ch...@cnmconsulting.net>.
Guys
Thanks for the recommendations. I took a step back and did a split on a
string, rather than an object. Smaller payload in the activemq queues.
Claus
An ArrayList<LsaResponse> is inbound to the split. I should not have
listed it in the split. Should split() just work, or do I need to list the
object type?
ArrayList<LsaRespons> -> splitter() -> queue -> LsaResponse
What is the syntax?
Thanks
Chris
On Tue, May 29, 2012 at 1:15 AM, Claus Ibsen <cl...@gmail.com> wrote:
> And are you sure LsaResponse is a Colection / Iteratable so it can be
> used for splitting?
>
> See the splitter docs
> http://camel.apache.org/splitter
>
> And use tracer to see what goes on
> http://camel.apache.org/tracer
>
> Or write an unit test and debug the code.
>
>
> On Tue, May 29, 2012 at 5:29 AM, Christopher Love
> <ch...@cnmconsulting.net> wrote:
> > Hi all I am trying to split an ArrayList and send it to a queue.
> >
> > I am not getting anything after the split. Ideas? What debug logging
> > should I tweak?
> >
> > from("seda:ReloadLSADocs")
> > .to("clearHeader")
> > .validate(header("IGIVE_DOIT").isNotNull())
> > .routeId("reload-lsa-docs")
> > .to("bean:lsaRedisService?method=reloadLsaDocs")
> > .split(body(LsaResponse.class)) // after this nothing
> > .throttle(100)
> > .to("activemq:reloadLsa?concurrentConsumers=1000&asyncConsumer=true");
> >
> > from("activemq:reloadLsa?concurrentConsumers=1000&asyncConsumer=true")
> > .to("log:com.igive.loaded?showBody=true")
> > .routeId("reload-lsa-docs-queue")
> > .to("log:com.igive.loaded?showBody=true")
> > .to("bean:redisRssService?method=lpushLsaHtml");
> >
> > Thanks
> >
> > Chris
> >
> > --
> > Chris Love
> > clove@cnmconsulting.net
> > http://www.cnmconsulting.net
> > Calendar: http://j.mp/cnmCalendar
> > Follow me on twitter: @chrislovecnm
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>
--
Chris Love
clove@cnmconsulting.net
(303) 929-8509
http://www.cnmconsulting.net
Calendar: http://j.mp/cnmCalendar
Follow me on twitter: @chrislovecnm
Re: Splitter Question - ArrayList
Posted by Claus Ibsen <cl...@gmail.com>.
And are you sure LsaResponse is a Colection / Iteratable so it can be
used for splitting?
See the splitter docs
http://camel.apache.org/splitter
And use tracer to see what goes on
http://camel.apache.org/tracer
Or write an unit test and debug the code.
On Tue, May 29, 2012 at 5:29 AM, Christopher Love
<ch...@cnmconsulting.net> wrote:
> Hi all I am trying to split an ArrayList and send it to a queue.
>
> I am not getting anything after the split. Ideas? What debug logging
> should I tweak?
>
> from("seda:ReloadLSADocs")
> .to("clearHeader")
> .validate(header("IGIVE_DOIT").isNotNull())
> .routeId("reload-lsa-docs")
> .to("bean:lsaRedisService?method=reloadLsaDocs")
> .split(body(LsaResponse.class)) // after this nothing
> .throttle(100)
> .to("activemq:reloadLsa?concurrentConsumers=1000&asyncConsumer=true");
>
> from("activemq:reloadLsa?concurrentConsumers=1000&asyncConsumer=true")
> .to("log:com.igive.loaded?showBody=true")
> .routeId("reload-lsa-docs-queue")
> .to("log:com.igive.loaded?showBody=true")
> .to("bean:redisRssService?method=lpushLsaHtml");
>
> Thanks
>
> Chris
>
> --
> Chris Love
> clove@cnmconsulting.net
> http://www.cnmconsulting.net
> Calendar: http://j.mp/cnmCalendar
> Follow me on twitter: @chrislovecnm
--
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/