[
https://issues.apache.org/jira/browse/CAMEL-27602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27602 started by shashank.
----------------------------------------
> camel-event: backpressurePolicy=Fail only drops;
> ExchangeAsyncProcessingStarted never fires
> -------------------------------------------------------------------------------------------
>
> Key: CAMEL-27602
> URL: https://issues.apache.org/jira/browse/CAMEL-27602
> Project: Camel
> Issue Type: Bug
> Reporter: Claus Ibsen
> Assignee: shashank
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-event for CAMEL-23832
> (PR https://github.com/apache/camel/pull/30942).
> These are separate problems of the component; the descriptions PR only
> documents the current behavior.
> h4. 1. backpressurePolicy=Fail does not fail anything, the event is only
> dropped with a WARN log
> With {{async=true}} and {{backpressurePolicy=Fail}},
> {{CamelEventConsumer.enqueueEvent()}} throws an {{IllegalStateException}}
> when the queue is full. The exception leaves {{EventNotifier.notify()}}, and
> {{EventHelper.doNotifyEvent()}} catches every {{Throwable}} from a notifier
> and logs "Error notifying event ... This exception will be ignored." at WARN.
> So for every event that Camel fires, Fail behaves like Drop with a WARN log
> and a stack trace per lost event. Only a direct
> {{ManagementStrategy.notify()}} call from user code (for example a custom
> event) sees the exception.
> Proposed change: decide what Fail should mean (for example route the failure
> to the consumer {{ExceptionHandler}} or to the error handler of the route),
> or document it as "drop and log at WARN" and consider removing the value.
> h4. 2. event:ExchangeAsyncProcessingStarted never receives an event
> {{CamelEventConsumer.configureEventNotifier()}} first sets
> {{ignoreExchangeEvents=true}} and has no case for
> {{CamelEvent.Type.ExchangeAsyncProcessingStarted}} (deprecated since 4.19.0),
> so the default branch enables nothing.
> {{EventHelper.notifyExchangeAsyncProcessingStartedEvent()}} skips a notifier
> when {{isIgnoreExchangeEvents()}} is true, so an endpoint that subscribes
> only to this type gets no events. It works only together with another
> exchange type, for example {{event:Exchange*}}.
> Proposed change: add a case that sets {{ignoreExchangeEvents=false}} for this
> type, or reject the type when the endpoint is created, as it is deprecated.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)