You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encountered an issue with our Quarkus application when defining a dead-letter-queue as the failure strategy and using a JSON serializer for a custom Ping class generated by Quarkus. The application fails to start only when deployed in a Kubernetes environment. The error message indicates that the Ping_Serializer_xxx class cannot be found.
Expected behavior
The application should start successfully in the Kubernetes environment without any errors. It should correctly initialize all necessary components, including the JSON serializer for the custom Ping class.
Actual behavior
The application fails to start when deployed in a Kubernetes environment. The error message indicates that the Ping_Serializer_xxx class cannot be found. The stack trace shows an IllegalArgumentException caused by the inability to create an instance of the Ping_Serializer class, followed by a ClassNotFoundException for the same class. This issue does not occur when running the Quarkus test in a local environment
How to Reproduce?
Attached you can find a reproducer on Quarkus 3.20.0 with some instruction in the README in how to reproduce it.
Simply build the project with the command:
mvn clean install
Then deploy the application in a Kubernetes environment with the command:
The dlq value serializer is only generated if failure-strategy=dead-letter-queue is set at build time (ie. at compilation).
This follows the Quarkus build-time principle. If you set the strategy only at runtime, Quarkus doesn't generate the serde classes.
The workaround is either to set the failure-strategy=dead-letter-queue in application.properties or if you must set the strategy at runtime, implement the serializer and set the dead-letter-queue.value.serializer yourself.
Describe the bug
We encountered an issue with our Quarkus application when defining a dead-letter-queue as the failure strategy and using a JSON serializer for a custom Ping class generated by Quarkus. The application fails to start only when deployed in a Kubernetes environment. The error message indicates that the Ping_Serializer_xxx class cannot be found.
Expected behavior
The application should start successfully in the Kubernetes environment without any errors. It should correctly initialize all necessary components, including the JSON serializer for the custom Ping class.
Actual behavior
The application fails to start when deployed in a Kubernetes environment. The error message indicates that the Ping_Serializer_xxx class cannot be found. The stack trace shows an IllegalArgumentException caused by the inability to create an instance of the Ping_Serializer class, followed by a ClassNotFoundException for the same class. This issue does not occur when running the Quarkus test in a local environment
How to Reproduce?
Attached you can find a reproducer on Quarkus 3.20.0 with some instruction in the README in how to reproduce it.
Simply build the project with the command:
Then deploy the application in a Kubernetes environment with the command:
quarkus-messaging-dlq.zip
Output of
uname -a
orver
No response
Output of
java -version
Java version: 21.0.5, vendor: Red Hat, Inc
Quarkus version or git rev
3.8, 3.15, 3.20
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.4
Additional information
No response
The text was updated successfully, but these errors were encountered: