Skip to content

Conversation

@pradeep85841
Copy link

This PR adds a unit test to validate VM transport behaviour when the broker
is stopped and restarted.

The test ensures:

  • Messages can be sent and received before broker shutdown
  • A restarted broker correctly accepts new VM transport connections
  • No stale broker registry state affects message delivery

Test passes when run in IDE and follows existing ActiveMQ unit test patterns.

Copy link
Contributor

@jeanouii jeanouii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, is this test because you have seen some weird behavior or because you faced issues with the VM transport?

Nothing critical, but FYI there are discussions to get rid of Spring, so it'd be nice to use Plain JMS APIs instead of JmsTemplate to ease future work to remove Spring. It's probably not of a big value here, so maybe something you can do. Again, not critical.

@pradeep85841 pradeep85841 force-pushed the amq-vm-transport-broker-restart-test branch from 67e0a6e to 77eb289 Compare January 26, 2026 12:48
Copy link
Contributor

@jeanouii jeanouii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing the small feedback.

Copy link
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the test.

nit: as this test is "squared" on vm, it would have make sense to add the test in the activemq-broker module (instead of activemq-unit-tests).
But that's a detail, and we can move it later.

@jbonofre
Copy link
Member

I just ran the CI. I will merge as soon as green.

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.

3 participants