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

Otavio Rodolfo Piske edited comment on CAMEL-20089 at 11/7/23 5:08 PM:
-----------------------------------------------------------------------

So, what I am thinking here is how we can give the users the same flexibility 
without an explosion of flags and/or flags combinations. 

I am considering - and this is by all means, just a an idea for now - whether 
we could replace some of these combinations with an error policy (or something 
like that) so that users can "plug" their own handler. Naturally, we would 
provide a few of those with the legacy behaviors, but users in need of more 
complex behaviors, could have just that. 

So, instead of having a flag {{breakOnFirstError}} we would have something like 
{{onError=BreakOnFirstPolicy}} or {{onError=ResubscribePolicy}} or 
{{onError=#bean:CustomErrorPolicyBean}}, etc.  


was (Author: orpiske):
So, what I am thinking here is how we can give the users the same flexibility 
without an explosion of flags and/or flags combinations. 

I am considering - and this is by all means, just a an idea for now - whether 
we could replace some of these combinations with an error policy (or something 
like that) so that users can "plug" their own handler. Naturally, we would 
provide a few of those with the legacy behaviors, but users in need of more 
complex behaviors, could have just that. 

So, instead of having a flag `breakOnFirstError` we would have something like 
`onError=BreakOnFirstPolicy` or `onError=ResubscribePolicy`, or 
`onError=#bean:CustomErrorPolicyBean`, etc.  

> camel-kafka: make breakOnFirstError more flexible
> -------------------------------------------------
>
>                 Key: CAMEL-20089
>                 URL: https://issues.apache.org/jira/browse/CAMEL-20089
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-kafka
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Major
>             Fix For: 4.x
>
>
> We have a very high incidence of problems in the camel-kafka component that 
> are related to the breakOnFirstError flag.
> Looking at the tickets related to this issue it seems to me that different 
> uses have different expectations about how the component should behave in 
> terms of polling, rolling back, and/or future processing. 
> In short: this flag is leading to a lot of confusion and we should 
> investigate how we can flexibilize the behavior of the Kafka component under 
> those circumstances and let the users choose more freely the behavior that is 
> suitable to their needs. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to