Skip to content

Spring Integration 6.1 to 6.2 Migration Guide

Artem Bilan edited this page Dec 19, 2023 · 7 revisions

Remove unused ThreadLocal from RedisStoreMessageSource

The ThreadLocal<RedisStore> resourceHolder variable in the RedisStoreMessageSource is out of use for a while in favor of IntegrationResourceHolder and its store attribute. Public methods getResource(), afterCommit(Object object), and afterRollback(Object object) were removed altogether since they haven't done any logic since functionality was migrated to IntegrationResourceHolder. See Redis Store Inbound Channel Adapter documentation for more information.

Mail module is upgraded to org.eclipse.angus:jakarta.mail-2.0.2

The IMAP functionality in Spring Integration has moved to the latest Java Mail implementation with Eclipse Angus. So, the com.sun.mail.imap package has been replaced with org.eclipse.angus.mail.imap.

Deprecation of the AbstractChannelMessageStoreQueryProvider

Methods from the AbstractChannelMessageStoreQueryProvider have been moved to the super ChannelMessageStoreQueryProvider interface as default. Since there is no more functionality in the AbstractChannelMessageStoreQueryProvider class, it was deprecated (for removal) and its usage in the implementations was replaced with just the super ChannelMessageStoreQueryProvider interface. Therefore there might be some breaking change where this AbstractChannelMessageStoreQueryProvider is used directly in the target projects. Consider to migrate to the mentioned super ChannelMessageStoreQueryProvider interface.

Key-Value Stores: Rename Message Group Prefix

The prefix for message group entries in key/value stores was MESSAGE_GROUP_, which really starts with the prefix for message entries - MESSAGE_. Therefore queries based on MESSAGE_* (MESSAGE_%) patterns returns message group entries as well. In this version the prefix for group entries has been changed to GROUP_OF_MESSAGES_, so pattern queries wouldn't conflict.

Default Poller Trigger as 1 second

The default Trigger for pollers (empty <int:poller/>, @Poller or new PollerMetadata()) is now a 1-second fixed delay period. This value is more reasonable than previous 10 milliseconds and reflects Spring Boot default behavior. Same 1-second period is also used by default in Spring Cloud Stream for polling endpoints.

SKIP LOCKED and MySQL

Some ChannelMessageStoreQueryProvider implementations are now adding a SKIP LOCKED hint for polling queries. The MySQL database might be configured for the transaction-isolation = REPEATABLE-READ. To avoid Lock wait timeout exceeded; try restarting transaction this property for MySQL has to be set to READ-COMMITTED. Or this can be configured from the Spring Integration poller perspective:

e.poller(poller ->
	poller.fixedDelay(1000)
		.transactional(
				new TransactionInterceptorBuilder()
					.isolation(Isolation.READ_COMMITTED)
					.build())))
Clone this wiki locally