apache / apache/camel-quarkus

If jandex is present in an extension, the RouteBuilder beans created by a runtime extension appear to be duplicated

Open
#3,844 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
302
Forks
232
Avg merge
1d 20h
Merged PRs (30d)
114

Description

In my setup, I have an extension with the jandex plugin applied to it so that the JARs contain a jandex.idx file. The build steps appear to run correctly, and record correctly. However, at runtime, when a Quarkus app attempts to get beans of type RouteBuilder, the RouteBuilder beans belonging to that extension get duplicated, and the duplicate instance has not had its constructor run. This duplicate bean later causes a runtime exception.

This could be user error; perhaps you don't want jandex indexes created for Quarkus extensions intended for Camel? Or perhaps this is indeed a bug in the way that Quarkus and Camel interact.

To reproduce, roughly speaking:
1. Create an extension and apply the jandex plugin to the runtime and deployment projects.
2. Create an application with a test that attempts to use Camel's registry to retrieve the RouteBuilder beans.

I am using Quarkus 2.9.2.Final, Camel 3.16.0, and camel-quarkus 2.9.0.

A reproduction git repo will be linked once the issue is posted.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the extension runtime and deployment projects, the jandex plugin setup, and the application test that retrieves RouteBuilder beans from Camel's registry. Reproduce the reported setup with Quarkus 2.9.2.Final, Camel 3.16.0, and camel-quarkus 2.9.0, then determine why the extension's RouteBuilder beans are duplicated. Done means the beans appear once and the duplicate instance no longer causes the runtime exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.