-
Notifications
You must be signed in to change notification settings - Fork 624
Spring Cloud Stream 2.0.0 Release Notes
Oleg Zhurakousky edited this page Jan 23, 2018
·
38 revisions
- Polling Consumer
- Micrometer
- Default Content type is set to
application/json
which needs to be taken into consideration when migrating 1.3 application and/or operating in the mixed mode (i.e., 1.3 producer -> 2.0 consumer). - Messages with textual payloads and "contentType"
text/*
or*/json
will be converted toMessage<String>
to maintain the behavioral compatibility with previous version of the framework. Message's payload will still be converted to the appropriate argument type by the argument resolvers (MessageConverter
's) if such argument is not aString
(i.e., POJO) essentially resulting in secondary conversion which is not necessary for most cases. We are considering a flag to override this behavior to avoid secondary conversion. - [TODO:Add to the DOC]
@StreamMessageConverter
- to define customMessageConverter
's used by argument resolvers. Added to the top of the list of existing MessageConverters - List of MessageConverter's configured by default (in order):
- TupleJsonMessageConverter - tbd
- ByteArrayMessageConverter - tbd
- ObjectStringMessageConverter - tbd
- JavaSerializationMessageConverter (DEPRECATED) - tbd
- KryoMessageConverter (DEPRECATED) - tbd
- JsonUnmarshallingMessageConverter - tbd
- The
contentType
as a hint to help select the appropriateMessageConverter
- JavaSerializationMessageConverter (DEPRECATED) - tbd
- KryoMessageConverter (DEPRECATED) - tbd
- Note about
partitionKeyExtractorClass
deprecation in favor of Spring configured beans - [TODO: ensure error is thrown at init]
partitionCount
must be accompanied by 'partitionKeyExtractor' otherwise it's an error
TODO 1.3 to 2.0 need migration pass for KryoConversion see #1142
- Actually consider section on overriding MessageCopnverters since by simply configuring
@StreamMessageConverter
and placing it ahead of existing one for the targeted content type one can accomplish override
@Bean
@StreamMessageConverter
public AlwaysStringKryoMessageConverter kryoOverrideMessageConverter() {
return new AlwaysStringKryoMessageConverter(MimeType.valueOf("application/x-java-object"));
}