Romeo Köppel created CAMEL-19170:
------------------------------------
Summary: HealthCheck for ActiveMQ in Quarkus
Key: CAMEL-19170
URL: https://issues.apache.org/jira/browse/CAMEL-19170
Project: Camel
Issue Type: Wish
Components: camel-activemq
Environment: Quarkus Version: 2.16.1.Final
camel-quarkus-activemq: 2.16.0
Reporter: Romeo Köppel
Hi
Currently when the services has no connection to the ActiveMQ ....
{code:java}
Feb 17 17:14:06 XXXXXXXX[568839]: 2023-02-17T16:14:06.810Z ERROR trace_id=
span_id= [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer]
(Camel (camel-1) thread #1 - JmsConsumer[XXXXXXXX]) Could not refresh JMS
Connection for destination 'XXXXXXXX' - retrying using
FixedBackOff{interval=5000, currentAttempts=1, maxAttempts=unlimited}. Cause:
Could not connect to broker URL: tcp://localhost:61616. Reason:
java.net.ConnectException: Connection refused
Feb 17 17:14:11 XXXXXXXX[568839]: 2023-02-17T16:14:11.813Z ERROR trace_id=
span_id= [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer]
(Camel (camel-1) thread #1 - JmsConsumer[XXXXXXXX]) Could not refresh JMS
Connection for destination 'XXXXXXXX' - retrying using
FixedBackOff{interval=5000, currentAttempts=2, maxAttempts=unlimited}. Cause:
Could not connect to broker URL: tcp://localhost:61616. Reason:
java.net.ConnectException: Connection refused {code}
... the service is UP anyway:
{code:java}
{
"status": "UP",
"checks": [
{
"name": "Database connections health check",
"status": "UP",
"data": {
"<default>": "UP"
}
},
{
"name": "camel-routes",
"status": "UP"
},
{
"name": "context",
"status": "UP",
"data": {
"context.name": "camel-1",
"context.phase": "5",
"context.version": "3.19.0",
"context.status": "Started",
"check.kind": "READINESS"
}
},
{
"name": "camel-consumers",
"status": "UP"
}
]
} {code}
The reason for this is probably, that the JMS Consumer hasn't implemented a
HealthCheck by default. I found this out within the ConsumerHealthCheck class
in the doCallCheck method.
Because of this I had to implement a custom HealthCheck for ActiveMQ.
Is it possible that in the future a HealthCheck for ActiveMQ will be delivered
by default?
Thanks a lot
--
This message was sent by Atlassian Jira
(v8.20.10#820010)