-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Spring Integration 5.4 to 5.5 Migration Guide
The global default errorCahnnel
, created by the Framework automatically (if doesn't exists), now supplied with two configuration properties:
-
spring.integration.channels.error.requireSubscribers=true
global property is added to indicate that global defaulterrorChannel
must be configured with therequireSubscribers
option (or not); -
spring.integration.channels.error.ignoreFailures=true
global property is added to indicate that global defaulterrorChannel
must ignore (or not) dispatching errors and pass the message to the next handler.
They are made as true
by default for better end-user experience when there is no subscribers to handle errors or when one of the subscribers fails and the rest should process an error yet.
If the application logic is based on a default (false
) value for those options, it is better to reconsider configuration in favor of custom error channel (not global), or change those properties in the META-INF/spring.integration.properties
file.
The HTTP request Content-Type
header is not populated as an application/x-java-serialized-object
fallback value in the HTTP Outbound Gateway and Channel Adapter.
Now the final decision how to convert a request body and what Content-Type
header to populate is deferred to the RestTemplate
and its HttpMessageConverter
set.
For example if you'd like to have your payload sent as a JSON, a MappingJackson2HttpMessageConverter
should be provided to the RestTemplate
or via HttpRequestExecutingMessageHandler.setMessageConverters()
. This way the payload is going to be serialized as a JSON and application/json
is set to the Content-Type
request header.
Previously we had to use a HeaderEnricher
upfront providing an explicit contentType
header to enforce a specific converter in the target HTTP Outbound Endpoint.
An AbstractPollingEndpoint
(source polling channel adapter and polling consumer) treats maxMessagesPerPoll == 0
as to skip calling the source.
It can be changed to different value later on, e.g. via a Control Bus.
Previously 0
had the same meaning as negative value - retrieve unlimited messages until the source returns null.