[
https://issues.apache.org/jira/browse/CAMEL-27474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27474 started by Guillaume Nodet.
-----------------------------------------------
> camel-hazelcast - the hazelcast-seda consumer and the queue consumer in poll
> mode stop for good after an Error from the poll
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27474
> URL: https://issues.apache.org/jira/browse/CAMEL-27474
> Project: Camel
> Issue Type: Sub-task
> Components: camel-hazelcast
> Reporter: Federico Mariani
> Assignee: Guillaume Nodet
> Priority: Major
>
> {{HazelcastSedaConsumer.run()}} (started with {{executor.execute}}) and
> {{HazelcastQueueConsumer.QueueConsumerTask.run()}} (poll mode, started with
> {{executor.submit}}) catch only {{Exception}}. The poll of the queue
> deserializes the item, and Hazelcast throws an Error of the deserialization
> on as it is ({{SerializationUtil.handleException}} in 5.4.0), such as a
> {{NoClassDefFoundError}} or an {{ExceptionInInitializerError}} of the class
> of the body, or of a header of the {{DefaultExchangeHolder}} with
> {{transferExchange=true}}. The loop ends, and with one consumer (the default)
> the queue is no longer consumed while the route still says Started. The
> hazelcast-seda thread dies, and only the default handler of the JVM prints
> the Error, on stderr. The Error of the queue consumer stays in a {{Future}}
> that nothing reads, and nothing is logged.
> Reproduced on main with a mocked {{IQueue}} whose first poll throws a
> {{NoClassDefFoundError}}, and which then returns the items offered:
> {noformat}
> hazelcast-seda: 1 poll, the item offered after it is not received, route
> Started
> hazelcast-queue (queueConsumerMode=Poll): 1 poll, the item offered after it
> is not received, route Started
> {noformat}
> Suggested fix: handle an Error that is not a {{VirtualMachineError}} as the
> exceptions are (exception handler, then the next poll).
> _Claude Code on behalf of Croway_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)