Skip to content

[AMQ-9447] Added Logic to check underlying transport connector limits#1192

Closed
AM-19 wants to merge 1 commit intoapache:mainfrom
AM-19:main
Closed

[AMQ-9447] Added Logic to check underlying transport connector limits#1192
AM-19 wants to merge 1 commit intoapache:mainfrom
AM-19:main

Conversation

@AM-19
Copy link
Contributor

@AM-19 AM-19 commented Mar 31, 2024

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.

@jbonofre
Copy link
Member

That's a good start, on Tcp transport. I will add additional more "specific" transport (like http/https/ws transport).

@jbonofre jbonofre self-requested a review March 31, 2024 17:04
@AM-19 AM-19 closed this Mar 31, 2024
@AM-19
Copy link
Contributor Author

AM-19 commented Mar 31, 2024

Hello @jbonofre

Have Re-opened as PR 1194
Sorry for the inconvenience.

Thanks
Anubhav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants