camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boday <>
Subject RE: Complete exchange from file parsing before parsing complete
Date Thu, 09 Jun 2011 20:11:35 GMT
hey Joe, if you need to send out fragments as they are parsed, then you can
use a ProducerTemplate  from
your parser class (created from the exchange, etc)...


class MyFileParser {
  public void parse(Exchange exchange) {
    ProducerTemplate template =
    while(<more data in file>) {
      String fragment = <get next fragment>;

Joe White-3 wrote:
> In that setup wouldn't "MyFileParser" have to finish parsing before the
> split occurred?
> I'd like to be able to multicast the objects out to queues as they are
> generated before the whole file is parsed in a spring configuration. In
> the example below Recon835Parser has code to publish to the dispatch
> queue.
> Ideally I'd like to skip the remitDispatch queue since all it is doing
> is routing, but it I would prefer to be in spring not in Java. I could
> write the multicast into the parser which isn't a big deal but isn't
> ideal as my parser then has to be JMS aware.

Ben O'Day
IT Consultant -

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message