Commit Graph

130 Commits

Author SHA1 Message Date
Soby Chacko
ae74c21720 Fixing compiler warnings
Fixing unchecked and deprecation warnings
Polishing

Resolves #1318
2018-03-21 14:55:22 -04:00
Soby Chacko
3d649e8e6a Back to 2.0.0.BUILD-SNAPSHOT 2018-03-12 16:29:38 -04:00
Soby Chacko
1bcfb8cd4a 2.0.0.RC3 Release 2018-03-12 15:13:46 -04:00
Gary Russell
12bd608908 Fix more trailing whitespace (tabs) 2018-03-12 10:26:46 -04:00
Soby Chacko
b2a4ef07dd Next version: 2.0.0.BUILD-SNAPSHOT 2018-03-01 09:27:42 -05:00
Soby Chacko
9e1930e1fd 2.0.0.RC2 Release 2018-03-01 09:08:10 -05:00
Soby Chacko
8ba93c2c79 Next version update: 2.0.0.BUILD-SNAPSHOT 2018-02-23 12:23:03 -05:00
Soby Chacko
11dd2392b1 2.0.0.RC1 Release 2018-02-23 12:02:39 -05:00
Oleg Zhurakousky
be96ec00cf Polish SI test binder after maven publishing
- Renamed classes and package to be consistent with the intentions of this binder (e.g., TestChannelBinder, TestChannelBinderConfiguration etc)
- Added package-info.java

Resolves #1241
2018-02-22 20:56:30 -05:00
Oleg Zhurakousky
0463f7939d GH-1175 Removed dependency on spring-boot-starter-web
- Removed spring-boot-starter-web dependency from the core
- Polished AggregateApplicationBuilder to ensure it thriows meaningful exception when web is enabled but 'spring-boot-starter-web' is not on the classpath
- fixed Aggregator tests to defualt to no-web
- added spring-boot-starter-web to schema projects

Resolves #1175
2018-02-09 10:39:52 -05:00
Soby Chacko
bac85f1a5b Back to 2.0.0.BUILD-SNAPSHOT 2018-02-05 13:54:26 -05:00
Soby Chacko
5a62215514 Update for 2.0.0.M4 Release 2018-02-05 13:30:40 -05:00
Oleg Zhurakousky
ee06a605d9 addressed PR comments 2018-02-03 07:33:27 -05:00
Oleg Zhurakousky
9672a5b4df Fixed double conversion issue
- removed custom conversion from In/Out interceptors delegating everything to the available  MessageConverters
- added initial version of content-type TCK to validate various content-type conversion scenarious
- added initial content-type conversion matrix to the WIKI https://github.com/spring-cloud/spring-cloud-stream/wiki/Content-type-conversion-matrix

Resolves #1130
Resolves #1071
2018-02-03 07:33:27 -05:00
Soby Chacko
c1749ca866 New abstraction for StreamListener method setup invoker.
StreamListenerMethodSetupOrchestrator is an API hook that allows
downstram binder implementations or applications to inject custom
strategies to alter the default StreamListener adapter method invocations.

This PR primarily focuses on allowing customizations on the oubound side.
For the inbound, StreamListenerMethodSetupOrchestrator interface provides
a default implementation.

Corresponding refactoring in StreamListenerAnnotationBeanPostProcessor.
By default StreamListenerAnnotationBeanPostProcessor will use the current
strategies used for invoking the StreamListener adapters. If beans are provided
for orchestration, they take precedence however.

Test changes.

Further polishing in StreamListenerAnnotationBeanPostProcessor.

Resolves #1177
Resolves #1179
2018-01-18 11:59:43 -05:00
Oleg Zhurakousky
80fee48b4a 1146 Fixed early initialization in StreamListenerAnnotationBeanPostProcessor
Removed autowiring from StreamListenerAnnotationBeanPostProcessor in favor of late-binding callbacks
Fixed tests

Resolves #1146
2017-12-13 11:14:45 -05:00
Oleg Zhurakousky
d0be34f7cb Refactored MessageConverterConfigurer
- Separated InboundContentTypeConvertingInterceptor and OutboundContentTypeConvertingInterceptor to isolate logic that needs to be performed by such interceptors for *inbound* and *outbound* messages.
- Documented their purpose via javadocs
- Moved InboundMessageConvertingInterceptor to TestSupportBinder (for now) to only support MessageCollector's 1.3 behavior
2017-11-14 10:12:43 -05:00
Soby Chacko
53df5f5747 Native endoding/decoding changes for interceptors
Fixes #1109

- Disable outbound content type interceptor when nativeEndoding is enabled on the producer
- Disable inbound content type interceptor when nativeDecoding is enabled on the consumer

- Add a new flag in ConsumerProperties for useNativeDecoding

- Apply ContentType interceptor before the InboundInterceptor to ensure
  that content type set on the channel is applied on the message if content type
  is missing on the Message.

- Add tests for verifying interceptors are not applied when native encoding/decoding is enabled
- Fix a kryo integration test
- Remove Inbound interceptor from MessageCollector when native encoding is enabled on the producer
- Polishing
2017-11-12 17:01:20 -05:00
Soby Chacko
9cc0b83a38 Update to next version: 2.0.0.BUILD-SNAPSHOT
Update spring-cloud-build parent to 2.0.0.BUILD-SNAPSHOT
2017-11-09 09:02:40 -05:00
Soby Chacko
03b7b0d612 Update to release version: 2.0.0.M3
spring-cloud-build parent to 2.0.0.M4
2017-11-09 08:50:15 -05:00
Oleg Zhurakousky
4e69ead7b4 GH-1126 Fixed default app port in Tests
Ensured AggregateApplicationTests, AggregateWithMainTest and AggregationTest arn't using default 8080 port
2017-11-08 13:10:47 -05:00
Oleg Zhurakousky
a7fdf6dbb2 GH-1106 Addressed backward/forward contentType compatibility issues
Fixes #1106

- This PR builds on the previous PR with commit hash 6c259be6... (pr/1112)
- Added support in AbstractBinderTests to create bindable channel based on determining channel input type based on it's name (i.e., *input*)
- Added LegacyContentTypeHeaderInterceptor to TestSupportBinder to restor the previous behavior of MessageCollector for cases
  where Message's payload content type is a variant of 'text'.
- Restored tests that use MessageCollector to depend on proper payload type
- Added 'deserialize' routine back to MessageSerializationUtils
- Polished MessageConverterConfigurer.LegacyContentTypeHeaderInterceptor to remove conditional original-content-type header logic
- Removed default contentType from BindingProperties
- Restored tests that use MessageCollector to depend on proper payload type
- polishing
- fixed Kryo/Java serialization
- Fixed ser/de for "application/json" and contentType equals
- Fixed of ser/de of JSON strings to ensure that Strings are not re-quoted
- Fixed how we comparing contentTypes
- more polishing
- Fixed NPE in MessageSerializationUtils
- Make bindings and consumer groups in new tests added to AbstractBinderTests mutually exclusive
2017-11-07 11:21:13 -05:00
Soby Chacko
6c259be62b Legacy cotent-type changes for the consumer
- Remove binding config property `legacyContentTypeHeaderEnabled` that was
  introduced to enable legacy content type handling
- Enable LegacyContentTypeInterceptor in 2.0 always, but bypass any
  legacy content type handling if the message received is from
  a 2.0 producer by checking on the version header
- Introdce a new BinderHeader property for version
- Fix the LegacyContentType related tests
- Remove the check for originalContentType in ReceivingHandler when
  the payload received is a byte[]
- Remove unnecessary deserializePayloadIfNecessary calls in ReceivingHandler
- Remove deprecated deserializePayload methods in AbstractBinder
  and MessageSerializationUtils

Partly fixes #1106
Fixes #1110
2017-10-26 13:05:10 -04:00
Soby Chacko
a06231b20f Next build version - 2.0.0.BUILD-SNAPSHOT 2017-10-19 09:22:54 -04:00
Soby Chacko
061d6bed5c Update version for 2.0.0.M2 release
sprig cloud stream - 2.0.0.M2
spring cloud build - 2.0.0.M4

Closes #1105
2017-10-19 08:27:59 -04:00
Soby Chacko
08504952e6 Default interceptor for legacy contentType
Fixes #1057

Enable consumers to convert from originalContentType to contentType in the case of
legacy producers sending messages with originalContentType header.
By default, this conversion will not happen and only be acitvated by setting
`spring.cloud.stream.bindings.input.legacyContentTypeHeaderEnabled` to true.
2017-10-06 18:52:22 -04:00
Vinicius Carvalho
171f034a8c Content type redesign
Fixes #992, #1050, #1051, #1052

Adding custom jackson converter with some tests
Adds kryo message converter to replace codec
Checkstyle changes

Removing codec support
- Removed codec dependency from AbstractBinder
- MessageSerializationUtils is almost an empty shell for now, just to
  keep code compiling until we get EmbeddedHeaders interceptors
- Updated Kryo tests

Removing codec module from build
Added a new Annotation for custom converters '@StreamConverter'
Fixed some tests with new expected behavior
Moved broken tests to a temporary package to keep track of progress
Fixed KryoConverter to fail based on headers
Fixed a couple of more tests

Making converters strict to only convert their corresponding contentType
Bypassing conversion for ErrorMessages

* Configuring SI ConfigurableCompositeMessageConverter
 - Moved ContentType related beans into separate configuration
 - Configured SI ConfigurableCompositeMessageConverter to use same
   converters as Stream does (for ServiceActivator)
- TupleConverter should return byte[] as all other converters
- Fixed tests

* Fixes tests
 - Revert to Boot 2.0.0.M3. Snapshots breaking actuator
 - Checkstyle fixes
 - Disable JsonUnmarshalling as a catch all converter

Fixing Schema tests
Fixing Metrics tests
Fixing reactive tests
applying checkstyle fixes

 * Adding new content type tests
 - Fixed ContentTypeInterceptor misusage of default mimeType

Changing contentType doc section
Improving doc section
Last minute polish
Fixing BinderTests to use bytes to compare messages
Applied changes to Base Binders test to use the new contentType handling mechanism
PR review fixes

Renaming StreamConverter -> StreamMessageConverter
2017-10-05 10:35:51 -04:00
Vinicius Carvalho
d317638bef Minor fixes
- Upgraded versions of reactor and SI in poms
- added .jdk8 to enable java-8 in build
- fixed changes in mockito api
2017-10-05 10:35:14 -04:00
Marius Bogoevici
57d3ba3317 Set version to 2.0.0.BUILD-SNAPSHOT 2017-10-05 10:33:57 -04:00
Marius Bogoevici
0546c8ed7e Release 2.0.0.M1 2017-10-05 10:33:57 -04:00
Janne Valkealahti
4f72a10bc6 Upgrade build to boot 2.x
- Pump up version to 2.0.0
- Some generic polish
- All changes around breakage with boot 2.x
- Some boot classes has been moved around
- You can't no longer have binding key ending with
  camelCase.
- New Binder now has illegal keys.
- Some changes to tests as we can directly do end-to-end
  testing with ENV_VAR_FORMAT as normal keys
- Spring data repo changes as now uses Optional
- Remove relaxed binder and its tests in favor of new Binder
- Some mockito api changes
- One Ingored test TextPlainToJsonConversionTest.testTextPlainToJsonConversionOnInput
- Relates to #935

Cache metric export properties

Add code formatting guidelines

Rearranged files
2017-10-05 10:31:09 -04:00
Gary Russell
e2c214b34e Update POMs to 1.3.1.BUILD-SNAPSHOT 2017-09-29 16:17:43 -04:00
Gary Russell
9e46ec00a0 Versions to 1.3.0.RELEASE, Bismuth-RELEASE 2017-09-29 11:31:06 -04:00
Soby Chacko
9fc51cb6e2 GH-1080: Fix StreamListener methods for proxies
Fix #1080

When class with `@StreamListener` method is proxied we end up
with the double target subscribers registration because we meet
the same method multiple times during `ReflectionUtils.doWithMethods()`

* Use `ReflectionUtils.getUniqueDeclaredMethods()` instead to extract
the list of method candidates

**Cherry-pick to 1.2.x**
2017-09-27 14:04:36 -04:00
Gary Russell
3701615a67 Back to 1.3.0.BUILD-SNAPSHOT 2017-09-13 11:04:00 -04:00
Gary Russell
15922e7321 Revert "Back to 1.3.0.BUILD-SNAPSHOT"
This reverts commit baed445872.

For release train build.
2017-09-13 10:37:07 -04:00
Gary Russell
baed445872 Back to 1.3.0.BUILD-SNAPSHOT 2017-09-12 15:54:54 -04:00
Gary Russell
5722f5af06 Update POMs to RC1; Boot 1.5.7; Reactor Bismuth-M4 2017-09-12 14:39:02 -04:00
Vinicius Carvalho
77c4564866 Update version to 1.3.0.BUILD-SNAPSHOT 2017-07-31 15:14:35 -04:00
Vinicius Carvalho
cc31d826aa Release 1.3.0.M2 2017-07-31 15:12:09 -04:00
Soby Chacko
22141a8dce GH-1028: error binding Content-Type negotiation
Fixes spring-cloud/spring-cloud-stream/#1028

Adding unit test to verify message conversion for error channel

Instead of directly binding on the error channel, use a bridge channel
and apply custom converters on that channel and then bind

Make corresponding test changes

renaming key used for error

Adding tests for exceptions on error channel when content type is set
2017-07-31 11:16:47 -04:00
Marius Bogoevici
d06fd64348 Update version to 1.3.0.BUILD-SNAPSHOT 2017-07-19 09:40:47 -04:00
Marius Bogoevici
f9b111afb5 Release 1.3.0.M1 2017-07-19 09:29:17 -04:00
Gary Russell
205d4579a4 GH-1010: @StreamListener: Fix Header Propagation
Fixes #1010

Propagate headers by default.

Add a `copyHeaders` property to `@StreamListener` to allow suppression of header propagation.

Honour header propagation settings
2017-07-18 13:50:54 -04:00
Marius Bogoevici
51deb128f0 Option to suppress header propagation with SI message handlers
Add `SpringIntegrationProperties` class with
`spring.cloud.stream.integration` prefix for managing
Spring Integration properties.

Add `spring.cloud.stream.integration.messageHandlerNotPropagatedHeaders`
for controlling headers propagated by reply producing handlers.

Fix #943

Remove SI version override
Cleanup

* Simple polishing according PR comments
2017-06-19 10:59:47 -04:00
Soby Chacko
338282455f Updating to next major release line: 1.3.0.BUILD-SNAPSHOT
Fix #968
2017-05-17 11:15:34 -04:00
Soby Chacko
ffcff3fcd1 Next update: 1.2.3.BUILD-SNAPSHOT 2017-05-16 15:37:51 -04:00
Soby Chacko
43352fa850 1.2.2.RELEASE 2017-05-16 15:17:28 -04:00
Ilayaperumal Gopinathan
bd002e4aaf Add code formatting guidelines
Add 'eclipse' folder containing Eclipse code
formatter configuration and instructions how to use
 it.

Update rule for join_wrapped_lines

 - Set to `false`

Resolves #930

Update README

Address review comments
2017-05-15 13:03:45 -04:00
Marius Bogoevici
63ff75f766 Set next development version 1.2.2.BUILD-SNAPSHOT 2017-04-11 22:21:03 -04:00