Camel threads in route with a rejectedPolicy equals Abort, when task rejected or aborted causes exception this exception is not caught by camel-route.

Solution Verified - Updated -

Issue

  • Within a Camel route (written in blueprint) a thread element is used to control the number of simultaneous executions of a block of actions.
  • Property rejectedPolicy="Abort" is set, as requirement is to capture when a task is rejected and respond to the consumer in an appropriate manner.
  • However when Abort reject policy exception is thrown, following is the exception trace
org.apache.camel.CamelExecutionException, 
caused by Caused by: java.util.concurrent.RejectedExecutionException,
  • Above exception is not caught by camel-route. It is propogated back to the consumer.
  • Consequently cannot respond to the consumer in an appropriate manner.

Environment

  • Red Hat JBoss Fuse
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content