Skip to content

Spring Integration 6.3 to 6.4 Migration Guide

Artem Bilan edited this page Sep 18, 2024 · 3 revisions

Deprecate LobHandler usage

With modern drivers we don't need BLOB-specific handling anymore. The regular PreparedStatement.setBytes() and ResultSet.getBytes() are enough for our serialized messages. Therefore a LobHandler option of the JdbcChannelMessageStore, JdbcMessageStore, ChannelMessageStorePreparedStatementSetter and MessageRowMapper is deprecated with no replacement.

Improve JdbcLockRegistry and RedisLockRegistry

The unlock() operation of JdbcLockRegistry and RedisLockRegistry now throws a ConcurrentModificationException when the data in DB cannot be marked as unlocked properly. Also, the LockRepository.delete() now returns boolean result of unlocking query to notify a JdbcLockRegistry.JdbcLock.unlock() operation to throw a ConcurrentModificationException if delete has failed.

Control Bus Management

The SpEL and Groovy support for Control Bus EI pattern has been deprecated in favor of less invasive Control Bus Management via ControlBusCommandRegistry (and supplemental ControlBusController REST endpoint at /control-bus). The ControlBusCommandRegistry processes simple commands like beanName.methodName from message payload and uses IntegrationMessageHeaderAccessor.CONTROL_BUS_ARGUMENTS message header as a list of the arguments for method to call (if any). The bean and its method to call must fit into Control Bus requirements: marked with @ManagedResource or implement Lifecycle contract. In other words, the new functionality is similar to JMX API. The simple existing expressions like @myEdnpoint.stop() are still supported and converted internally into something like myEdnpoint.stop command, but those like @taskScheduler.setPoolSize(10) are not supported any more and have to migrate to more simple exposure, like taskScheduler.setPoolSize as a message payload and setHeader(IntegrationMessageHeaderAccessor.CONTROL_BUS_ARGUMENTS, List.of(10)). More complex expressions, like conditional, concatenations and based on method argument resolutions before target method call, have to migrate to dedicated service methods with simple signature to expose using @ManagedResource and @ManagedOperation/@ManagedAttribute.