Federico Mariani created CAMEL-27471:
----------------------------------------

             Summary: camel-seda - a VirtualMachineError in the route ends the 
consumer thread, and the queue is no longer consumed
                 Key: CAMEL-27471
                 URL: https://issues.apache.org/jira/browse/CAMEL-27471
             Project: Camel
          Issue Type: Sub-task
          Components: camel-seda
            Reporter: Federico Mariani


{{SedaConsumer.run()}} catches only {{Exception}} around the processing of a 
polled exchange. A {{VirtualMachineError}} thrown in the route, which 
CAMEL-26741 throws on to the caller on purpose, ends the consumer thread. With 
the default {{concurrentConsumers=1}} nothing consumes the queue any more: the 
producers keep adding to it until it is full, and the route still says Started. 
Only the default handler of the JVM prints the Error, on stderr.

Reproduced on main: 5 messages sent to {{seda:in}}, the route throws a 
{{StackOverflowError}} on the first:
{noformat}
processed 1 of 5, 4 left in the queue, route Started
{noformat}

Suggested fix: catch the Error in the loop, log it at ERROR and go on with the 
next exchange (for a {{VirtualMachineError}}, see the proposal of the parent 
issue).

_Claude Code on behalf of Croway_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to