MQ

 View Only

IBM MQ Spring JMS samples

By Harshit Sharma posted 23 days ago

  

We are pleased to announce that the Spring samples in the mq-dev-patterns repository have been updated to support Spring-Boot 3. These changes were made as Spring-Boot 2 is now at the end of regular support, which you can read more about in this blog by Mark Taylor.

Spring-Boot 3 provides support for reactive programming and Java 17 making it easier to build responsive and scalable applications. It also enhances the overall development experience with its improved auto-configuration and performance optimizations. These features simplify application configuration and significantly reduce startup times, leading to quicker application processing and a more streamlined development process.

Changes made to align the samples with Spring-Boot 3

As mentioned in this guide, MQ adaptors have been deprecated for DSL integration flows, and all the functions belonging to this class were moved to the IntegrationFlow interface.

Previously, the samples using the IntegrationFlows in Spring Integration 5 were as follows:

return IntegrationFlows.fromSupplier(new DataSource(), e -> e.poller(Pollers.fixedRate(120, TimeUnit.SECONDS, 60)))

These have now been changed to the IntegrationFlow interface in Spring Integration 6:

return IntegrationFlow.fromSupplier(new DataSource(), e -> e.poller(Pollers.fixedRate(Duration.of(120,TimeUnit.SECONDS.toChronoUnit()),Duration.of(60,TimeUnit.SECONDS.toChronoUnit()))))

As well as this, we added TLS support to enable developers to leverage the services of IBM MQ on Cloud and to provide enhanced security. Additional steps are needed to setup TLS, which can be found in this tutorial.

We have also refactored to simplify library dependencies and make the samples easier to use.

Conclusion:

The Spring-Boot 3 framework provides a production-ready environment which enables developers to focus on the logic instead of struggling with configuration and set up. These samples are one of the most visited in the repo and are a great resource for integrating Spring-Boot applications to IBM MQ. We encourage you to explore these samples and share any feedback you may have to enhance them further.

By @Tanay Singh and @Harshit Sharma 

0 comments
26 views

Permalink