|
2 | 2 | = What's New? |
3 | 3 |
|
4 | 4 | [[spring-integration-intro-new]] |
5 | | -For those who are already familiar with Spring Integration, this chapter provides a brief overview of the new features of version 7.0. |
| 5 | +For those who are already familiar with Spring Integration, this chapter provides a brief overview of the new features of version 7.1. |
6 | 6 |
|
7 | 7 | If you are interested in the changes and features that were introduced in earlier versions, see the xref:history.adoc[Change History]. |
8 | 8 |
|
9 | | -[[what-s-new-in-spring-integration-7-0]] |
10 | | -== What's New in Spring Integration 7.0? |
| 9 | +[[what-s-new-in-spring-integration-7-1]] |
| 10 | +== What's New in Spring Integration 7.1? |
11 | 11 |
|
12 | | -For more details, see the https://github.com/spring-projects/spring-integration/issues[GitHub Issues] that were resolved as part of the 7.0 development process. |
| 12 | +For more details, see the https://github.com/spring-projects/spring-integration/issues[GitHub Issues] that were resolved as part of the 7.1 development process. |
13 | 13 |
|
14 | 14 | In general, the project has been moved to the latest dependency versions. |
15 | | -Java 17 is still the baseline, but Java 24 is supported. |
| 15 | +Java 17 is still the baseline, but Java 25 is supported. |
16 | 16 |
|
17 | | -[[x7.0-general]] |
18 | | -== General Changes |
19 | | - |
20 | | -Junit 4-Based Support Components are deprecated. |
21 | | - |
22 | | -The project now leverages https://jspecify.dev/docs/start-here/[JSpecify] annotations to expose null-safe APIs and to check the consistency of those nullability declarations with https://github.com/uber/NullAway[NullAway] as part of its build. |
23 | | - |
24 | | -The `spring-retry` dependency, together with all its API usage have been replaced by retry API in Spring Framework Core module. |
25 | | -This breaking change is the natural evolution of the whole Spring portfolio. |
26 | | -In general, the following references have been migrated: |
27 | | - |
28 | | -- `org.springframework.retry.support.RetryTemplate` -> `org.springframework.core.retry.RetryTemplate`; |
29 | | -- `org.springframework.retry.RetryPolicy` -> `org.springframework.core.retry.RetryPolicy`; |
30 | | -- `org.springframework.retry.RecoveryCallback` -> `org.springframework.integration.core.RecoveryCallback`. |
31 | | -There is no `RecoveryCallback` abstraction in the Spring Framework, since regular `try..catch` on the `RetryException` is enough. |
32 | | -For Spring Integration, the `RecoveryCallback` makes sense as a dead-letter publisher to an error channel; |
33 | | -- `org.springframework.retry.backoff.BackOffPolicy` -> `org.springframework.util.backoff.BackOff`. |
34 | | -However, it is not exposed directly as a `RetryTemplate` options: rather as an internal API backed by the configuration via `RetryPolicy.Builder`; |
35 | | -- The `RetryContext` in AMPQ, JMS and Apache Kafka channel adapters is replaced with an internal `AttributeAccessor` implementation. |
36 | | - |
37 | | -Therefore, the following project classes have suffered breaking changes: |
38 | | - |
39 | | -- `AmqpBaseInboundChannelAdapterSpec` |
40 | | -- `AmqpBaseInboundGatewaySpec` |
41 | | -- `AmqpInboundChannelAdapter` |
42 | | -- `AmqpInboundGateway` |
43 | | -- `PostgresSubscribableChannel` |
44 | | -- `ChannelPublishingJmsMessageListener` |
45 | | -- `JmsInboundGatewaySpec` |
46 | | -- `JmsMessageDrivenChannelAdapterSpec` |
47 | | -- `KafkaInboundGatewaySpec` |
48 | | -- `KafkaMessageDrivenChannelAdapterSpec` |
49 | | -- `KafkaInboundEndpoint` |
50 | | -- `KafkaInboundGateway` |
51 | | -- `KafkaMessageDrivenChannelAdapter` |
52 | | - |
53 | | -The `RequestHandlerRetryAdvice` was rebuilt to avoid external API as much as possible. |
54 | | -For the stateless retry logic, there is just enough to provide a `org.springframework.core.retry.RetryPolicy`. |
55 | | -The stateful retry logic is activated by the `Function<Message<?>, Object> stateKeyFunction`. |
56 | | -The `RetryStateGenerator` abstraction and its `SpelExpressionRetryStateGenerator` implementation have been removed due to dependency on the `spring-retry` API. |
57 | | - |
58 | | -The `max-attempts` attribute of the `<int:handler-retry-advice>` XML component has been renamed to the `max-retries` to better reflect the logic behind this property which is exactly about the number of attempts to call a failing handler. |
59 | | - |
60 | | -See xref:handler-advice/classes.adoc#retry-advice[Retry Advice] for more information. |
61 | | - |
62 | | -All the modules now follow the standard package structure. |
63 | | -The inbound and outbound components are declared in the `inbound` and `outbound` packages, respectively. |
64 | | -The `MessageChannel` implementations in the `channel` package. |
65 | | -Most of the modules have followed this rule from day one. |
66 | | -The refactoring for package structure in this version includes the rest of modules: `spring-integration-file`, `spring-integration-ftp`, `spring-integration-ip`, `spring-integration-jdbc`, `spring-integration-jms`, `spring-integration-jmx`, `spring-integration-mail`, `spring-integration-sftp`, `spring-integration-stream` and `spring-integration-ws`. |
67 | | -The classes which were in root packages are marked now as deprecated. |
68 | | - |
69 | | -[[x7.0-new-components]] |
70 | | -== New Components |
71 | | - |
72 | | -A new `DistributedLock` interface has been introduced, providing new methods, `lock(Duration ttl`) and `tryLock(long time, TimeUnit unit, Duration ttl)`, to acquire a lock with a custom time-to-live (TTL). |
73 | | -See xref:distributed-locks.adoc[] for more information. |
74 | | - |
75 | | -The Jackson 2 support has been deprecated for removal. |
76 | | -Jackson 3 is now the default with new components: `JacksonJsonObjectMapper`, `JacksonPropertyAccessor`, `JacksonIndexAccessor`, and `JacksonMessagingUtils`. |
77 | | -See their Javadocs for more information and deprecated classes for a migration path. |
78 | | - |
79 | | -The `spring-integration-amqp` module now implements channel adapters for RabbitMQ AMQP 1.0 support. |
80 | | -The dedicated xref:amqp/amqp-1.0.adoc[AMQP 1.0 Support] chapter provides more information. |
81 | | - |
82 | | -[[x7.0-jdbc-changes]] |
83 | | -=== JDBC Changes |
84 | | - |
85 | | -The JDBC module now provides a Java DSL API via its dedicated `org.springframework.integration.jdbc.dsl.Jdbc` factory. |
86 | | -The xref:jdbc/dsl.adoc[] chapter provides more details. |
87 | | - |
88 | | -The `JdbcLock` now supports the feature of customized time-to-live for the lock status data. |
89 | | -See xref:jdbc/lock-registry.adoc[] for more information. |
90 | | - |
91 | | -The message stores now use a `MESSAGE_CONTENT` column name for serialized messages instead of `MESSAGE_BYTES` since the content might not always be stored as a byte array. |
92 | | -All the out-of-the-box SQL schemas have been changed, too, to rely on the `MESSAGE_CONTENT` name for the respective column in the `INT_MESSAGE` and `INT_CHANNEL_MESSAGE` tables. |
93 | | -See xref:jdbc/message-store.adoc[] for more information. |
94 | | - |
95 | | -The `JdbcChannelMessageStore` now supports JSON serialization as an alternative to Java serialization. |
96 | | -New components `JsonChannelMessageStorePreparedStatementSetter` and `JsonMessageRowMapper` enable storing messages in JSON format. |
97 | | -This requires modifying the database schema to use text-based column types (such as `JSONB`, `JSON`, `TEXT`, or `CLOB`) instead of binary types. |
98 | | -See xref:jdbc/message-store-json.adoc[] for more information. |
99 | | - |
100 | | -[[x7.0-redis-changes]] |
101 | | -=== Redis Changes |
102 | | - |
103 | | -The `RedisLock` now supports the feature of customized time-to-live for the lock status data. |
104 | | -See xref:redis.adoc#redis-lock-registry[Redis Lock Registry] for more information. |
105 | | - |
106 | | -[[x7.0-hazelcast-changes]] |
107 | | -=== Hazelcast Changes |
108 | | - |
109 | | -Previously deprecated classes in the `spring-integation-hazelcast` module, such as `LeaderInitiator`, `HazelcastMembershipListener`, `HazelcastLocalInstanceRegistrar` and `HazelcastLockRegistry`, are now removed due to not supported CP-subsystem in Hazelcast library for Open Source. |
110 | | - |
111 | | -[[x7.0-mqtt-changes]] |
112 | | -=== MQTT Changes |
113 | | - |
114 | | -The `AbstractMqttMessageDrivenChannelAdapter` and `ClientManager` implementations now expose a `quiescentTimeout` option which is propagated in their `stop()` method down to the `disconnectForcibly()` API of the MQTT Paho clients. |
115 | | -See xref:mqtt.adoc[] for more information. |
116 | | - |
117 | | -[[x7.0-files-changes]] |
118 | | -=== Files Changes |
119 | | - |
120 | | -The `FileReadingMessageSource` now can be configured with a SpEL `Expression` for its `directory` property. |
121 | | -See xref:file/reading.adoc[] for more information. |
122 | | - |
123 | | -[[x7.0-remote-files-changes]] |
124 | | -=== Remote Files Support Changes |
125 | | - |
126 | | -The `AbstractInboundFileSynchronizer` now caches a filtered result of the `Session.list(remoteDirectory)` after slicing by the `maxFetchSize`. |
127 | | -So, later synchronizations deal with the cache only by the `maxFetchSize` until the cache is exhausted. |
128 | | -See xref:sftp/max-fetch.adoc[] for more information. |
129 | | - |
130 | | -All the `AbstractPersistentAcceptOnceFileListFilter` implementations now use a "long file name" for the metadata entry key. |
131 | | -Previously, just a file name may cause the metadata overriding problem when the same filter is used for different directories with same file names. |
132 | | -For example, the `RotatingServerAdvice` may switch to directories based on the timestamp, but files are placed there with the same name according to business logic. |
133 | | -See xref:file/remote-persistent-flf.adoc[Remote Persistent File List Filters] for more information. |
134 | | - |
135 | | -[[x7.0-null-safety]] |
136 | | -=== Null Safety |
137 | | -Updated the codebase to use JSpecify and NullAway, adding a comprehensive null safety implementation that uses `@NullMarked` annotations to default all types to non-null at the package level and `@Nullable` annotations to explicitly mark types that can be null. |
138 | | -See xref:null-safety.adoc[] for more information. |
139 | | - |
140 | | -[[x7.0-smb-upgrade]] |
141 | | -=== SMB Support Changes |
142 | | - |
143 | | -The JCIFS library behind the SMB support module has been upgraded to 3.0.0. |
144 | | -It is a major rewrite of the codebase and implements a new package structure. |
145 | | -This is a breaking change, and direct references to components of the JCIFS library will need to be updated. |
146 | | -See xref:smb.adoc[] for more information. |
0 commit comments