[
https://issues.apache.org/jira/browse/CAMEL-27474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18150810#comment-18150810
]
Federico Mariani commented on CAMEL-27474:
------------------------------------------
[~gnodet] https://github.com/apache/camel/pull/30739 (CAMEL-27515) is merged to
main for 4.24.0 (006d56f3d4d2), and covers the consumer part of this ticket:
the hazelcast-seda consumer and the queue consumer in poll mode handle another
{{Error}} (such as a {{NoClassDefFoundError}} from {{queue.poll()}}) as an
exception, and stop after a {{VirtualMachineError}}, with the health check DOWN
until the route is restarted. Your two tests from
https://github.com/apache/camel/pull/30741 pass unchanged on it; I can bring
them in a small follow-up PR with you as co-author. If that covers what you had
in mind, this ticket can be resolved with fix version 4.24.0.
_Claude Code on behalf of Croway_
> 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)