camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-3211) Enrich and PollEnrich - Option to let it poll multiple messages
Date Sun, 08 Jul 2012 09:10:33 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-3211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408876#comment-13408876
] 

Claus Ibsen commented on CAMEL-3211:
------------------------------------

This is more difficult than at first thought. 

I think a solution would require for the components/consumer(s) to support this more natively
with an API change.
So they can return exchanges in a batch. Currently what happens is that the PollingConsumer
API fetches 1 exchange at a time.

I would prefer to work on this in Camel 3.0 where API changes is easier to introduce. Also
we should think about that these consumers should have an option to limit how many to consume,
eg imagine a file/ftp system with 1000000 of files. For that we can use the maxMessagesPerPoll
option. But this option is only available for polling batch consumers. So for a JMS endpoint,
that does not have this option, there is no current way to limit the poll to max 100 messages
etc. Also the though of having some way of stopping using a predicate/expression would be
nice, so people can break out sooner, for example when a "special" message was consumed. 

There is also the aspect of TX. For example with a JMS endpoint. It would be nice to be able
to poll a batch and act in a TX.

Another aspect is that the polled exchanges may have on completion work associated (eg to
delete/move a consumed file). And we need to ensure that these on completions gets propagated
to the merged exchange, to be executed when its uow is done etc.

And take note everytime the DSL is changed in camel-core, then you may have to adjust code
in camel-scala to make the DSL in sync.

                
> Enrich and PollEnrich - Option to let it poll multiple messages
> ---------------------------------------------------------------
>
>                 Key: CAMEL-3211
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3211
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.4.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.11
>
>
> Think about if we can enhance enrich and/or pollEnrich to be able to poll multiple messages.
> For example to drain a JMS queue, or a FTP site etc. Currently it polls only 1 message,
and the continues.
> With some option to tell it to continue we can have it drain the queue until no more
messages.
> Or maybe some expression to tell when to stop. Or have some option in the custom aggregator
the end user can set/control if it should continue or poll more.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message