[
https://issues.apache.org/jira/browse/AMQ-9447?focusedWorklogId=912392&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-912392
]
ASF GitHub Bot logged work on AMQ-9447:
---------------------------------------
Author: ASF GitHub Bot
Created on: 31/Mar/24 18:20
Start Date: 31/Mar/24 18:20
Worklog Time Spent: 10m
Work Description: AM-19 opened a new pull request, #1194:
URL: https://github.com/apache/activemq/pull/1194
(Re-Opened)
Hello Team,
With Regards to Transport Connector, Have added a check based on the
connection count.
Also in the ticket, With regards to JDBC Persistence Check, We may need to
have JDBC persistence associated classes in activemq-broker,jar, Post that we
can have a logic something like following:
`
if (brokerService != null && brokerService.getPersistenceAdapter()
!= null
&& brokerService.getPersistenceAdapter() instanceof
JDBCPersistenceAdapter ) {
JDBCPersistenceAdapter jdbcAdapter = (JDBCPersistenceAdapter)
brokerService.getPersistenceAdapter();
String message = "Issue with Persistence layer";
try {
ResultSet rs = null;
Statement stmt =
jdbcAdapter.getDataSource().getConnection().createStatement();
rs = stmt.executeQuery("SELECT 1");
String message =
if(rs.next())
if(rs.getInt(1)!=1)
answer.add(new
HealthStatus("org.apache.activemq.store.jdbc.JDBCPersistenceAdapterIssue",
"ERROR", message, jdbcAdapter.toString()));
} catch(Exception e) {
answer.add(new
HealthStatus("org.apache.activemq.store.jdbc.JDBCPersistenceAdapterIssue",
"ERROR", message, jdbcAdapter.toString()));
}
}
`
Ive Tested the above and it works as expected. But again that would require
whole jdbc persistence adapter code.
Issue Time Tracking
-------------------
Worklog Id: (was: 912392)
Time Spent: 40m (was: 0.5h)
> ActiveMQ Jolokia health service returns "good" even when persistence or
> transports are failing
> ----------------------------------------------------------------------------------------------
>
> Key: AMQ-9447
> URL: https://issues.apache.org/jira/browse/AMQ-9447
> Project: ActiveMQ Classic
> Issue Type: Improvement
> Components: Broker, JMX
> Affects Versions: 5.18.3
> Reporter: Ephemeris Lappis
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 6.2.0, 5.18.5
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> The Jolokia health service only considers the BrokerService status, it
> doesn't check all layers (like persistent store or transports).
> The CurrentStatus should not be "Good" if some underlying service is failing.
> For example, with a JDBC persistence adapter, if the DB is not reachable, the
> broker should not be considered as OK.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)