Skip to content

Add configurable timeout for JMS health indicator#50957

Merged
snicoll merged 2 commits into
spring-projects:mainfrom
GollapudiSrikanth:srikanthgollapudi-configurable-timeout-jmshandler
Jul 16, 2026
Merged

Add configurable timeout for JMS health indicator#50957
snicoll merged 2 commits into
spring-projects:mainfrom
GollapudiSrikanth:srikanthgollapudi-configurable-timeout-jmshandler

Conversation

@GollapudiSrikanth

@GollapudiSrikanth GollapudiSrikanth commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This PR adds configurable timeout support to JmsHealthIndicator.

Previously, the JMS health indicator used a fixed 5 second timeout when starting a JMS connection. This change keeps the existing 5 second default while allowing users to configure the timeout with:

management.health.jms.timeout

Changes:

  • Added JmsHealthIndicatorProperties for management.health.jms.
  • Added JmsHealthIndicator(ConnectionFactory, Duration).
  • Preserved the existing single-argument constructor with the 5 second default.
  • Validates that the timeout is non-null and greater than zero.
  • Wires the configured timeout through JmsHealthContributorAutoConfiguration.
  • Adds tests for default behavior, configured timeout behavior, and invalid timeout values.
Screenshot 2026-07-15 at 9 31 30 PM

Closes #50926

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 16, 2026
@snicoll snicoll self-assigned this Jul 16, 2026
@snicoll snicoll added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 16, 2026
@snicoll snicoll added this to the 4.2.x milestone Jul 16, 2026
@snicoll
snicoll force-pushed the srikanthgollapudi-configurable-timeout-jmshandler branch from 75edf84 to db12d4d Compare July 16, 2026 09:30
@snicoll
snicoll merged commit 42e725d into spring-projects:main Jul 16, 2026
2 of 3 checks passed
@snicoll snicoll modified the milestones: 4.2.x, 4.2.0-M1 Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add configurable timeout support to JmsHealthIndicator

3 participants