The first pre-release version of Spring Boot 4 (milestone 1) has just been published. What does it mean for MQ’s support of the Spring Boot environment?
MQ Spring Boot Starter
With the latest release (3.5.4) of the MQ Spring Boot Starter, I’ve also included the material needed to compile against the 4.0.0-M1
version. I’ve not released the binary jar files to Maven Central, but if you want to try out the new version, you can easily build it yourself from the source tree. Clone the MQ Spring repository, and then run RUNME.sh -b4
. [Even releasing the 3.5.4 jars to Maven Central was a bit of a story, as the owners of that system have made major changes to the processes – this was the first time we’d had to use it with a gradle-based tool.]
You can then modify the build.gradle
files in one or more of the sample directories to reference the M1 version, and try out running a sample against that new version. Apart from the version number, no other changes seemed necessary in the samples I tried.
Just as we had to do with the move from Spring Boot 2 to 3, the intention is to be able to use the same source code to build against multiple levels of Spring Boot. So any new features in the underlying MQ product that we want to expose can be made available in the same way for both Boot 3 and Boot 4 users.
At some point, of course, we’d expect to no longer enhance the Boot 3 module. But that will not be immediately on the GA of Boot 4. There will be a phased migration, primarily in the source code, as happened on the previous major version change.
Spring Boot changes
This time there are no changes to the JMS interface itself, but there are changes within Spring: a whole bunch of classes have moved their import package name. While that certainly affects the MQ component that uses those packages, it might affect your application code too. The changes were not initially documented in Spring’s migration guide; hopefully they will be there soon.
But as an example, I had to make these changes (see makeBoot4.sh
in the repo):
org.springframework.boot.autoconfigure.jms -> org.springframework.boot.jms.autoconfigure org.springframework.boot.autoconfigure.transaction.jta -> org.springframework.boot.transaction.jta.autoconfigure
There were various other necessary changes to the underlying dependent modules. Again, your MQ JMS application using this starter does not need to know the details. Other application dependencies that you have may be more visible.
Spring Framework changes
It does not directly affect the MQ Spring Boot Starter, but the Spring Framework (currently 7.0.0-M7
) that goes alongside the new Boot version does have some JMS-related features that you might choose to use.
There is a new JmsClient
class that provides similar services to the JmsTemplate
class, but with a different style. This has a Fluent model,which allows chaining of methods in a single line of code. The underlying implementations are unchanged. So the MQ Spring Boot Starter with its existing configuration works for applications using that class:
JmsClient client = context.getBean(JmsClient.class); String outMsg = "Hello from IBM MQ" client.destination(qName).send(outMsg);
This does mean that everyone will have to be fairly careful about what is meant when talking about a “JMS Client” – do you mean this new class, or the MQ JMS client jars.
Summary
We like to keep the MQ components updated to match related technologies. As Spring Boot 4 heads towards its GA, we’ll be keeping an eye on anything more that’s needed. I’d expect us to release a binary jar of the starter to go alongside a future milestone release. Then of course, there will be a “real” level to match the official start of Boot 4’s cycle.
This post was last updated on July 29th, 2025 at 02:36 pm