Commit Graph

78 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
09f4c8118f GH-1228 Type resolvers cleanup
- moved OriginalContentTypeResolver to avro module
- removed StringConvertingContentTypeResolver as it is no longer referenced anywhere
- deprecated KryoMessageConverter

Resolves #1228
2018-02-17 16:35:21 -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
1211a273f6 Added support for framework provided converter to DefaultPollableMessageSource
- Merged SmartJsonMessageConverter with ApplicationJsonMessageMarshallingConverter
- Fixed Tests
- Fixed SpringIntegrationChannelBinder to enforce byte[] payload type for polling delegate
- Other minor polishings

Resolves #1197
2018-02-04 13:26:06 -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
Gary Russell
b12480c487 GH-1191: Add test support for pollable sources 2018-01-24 13:01:25 -05:00
Oleg Zhurakousky
00748985d6 Support @Beans for Partitioning Properties
Fixed support for partition properties to be Spring configured

- Fixed support for 'partitionKeyExtractor' and 'partitionSelector' to be Spring configured
- Added new producer properties 'partitionKeyExtractorName' and 'partitionSelectorName'
- Deprecated 'partitionKeyExtractorClass' and 'partitionSelectorClass' properties
- Removed InitilaizingBean from MessageConverterConfigurer
- Updated documentation
- Added additional tests
- Removed PartitionedProducerTest  as redundant
- Fixed unrelated to this effort BinderPropertiesTests due to recent Boot changes

polishing
2018-01-16 15:24:16 -05:00
Gary Russell
7267661d2e GH-1174: Add Pollable Consumer
Resolves: https://github.com/spring-cloud/spring-cloud-stream/issues/1174

Introduce `PollableMessageSource` for polled consumers.

The `@Input` annotation can now be applied to interface methods returning
`PollableMessageSource` and binders that can support polled consumers
will wire up an implementation `DefaultPollableMessageSource` which can
then be `poll()`ed.

The `poll()` method takes a `MessageHandler` callback to handle any message
returned by the poll; the method returns true if a message was found and
handled, false otherwise.

By default, acknowledging the message is deferred until the message handler
returns but that auto-acknowledging can be disabled if the user wishes to
defer the acknowledgment until later. Refer to the Spring Integration
documentation for more information (internally, a `MessageSourcePollingTemplate`
is used, which performs the ack/nack when the handler exits).

Usage:

```java
public interface PolledConsumer extends Processor {

	@Input("pollableSource")
	PollableMessageSource pollableSource();

}
```

and

```java
@Bean
public ApplicationRunner runner(PollableMessageSource pollableSource) {
	return args -> pollableSource.poll(message -> {
		System.out.println("Polled payload: " + message.getPayload());
	});
}
```

Polishing

Fix test; add support to test binder.

Add error channel handling and retry

More polishing driven by Rabbit implementation

- can't use the MessageSourcePollingTemplate within retry since it will fetch more messages
- populate the retry context with data for the error message strategy

Polishing - PR Comments

Fix NPE.

Revert finally in DefaultPollableMessageSource

Catch Throwable - JUnit throws Errors

Change method name to reflect it's only used for polled consumers.

Fix errors when no retry

Remove stack trace print

Fix error message strategy context with no retry

Add separate error MessageHandler for polled consumers.

Resolves #1174
Resolves #1176
2018-01-13 11:44:04 -05:00
Artem Bilan
7d2e3a3815 Fix AbstractBinderTests to populate properties
Some tests in `AbstractBinderTests` are rely on the partition header,
but that one can be populated only by the `PartitionInterceptor`.
To allow it we need to provide appropriate producer properties, like
`partitionKeyExpression`.

* Populate test-based `ProducerProperties` to the
`createBindableChannel()` where `PartitionInterceptor` is populated
* Fix `checkstyle.xml` static imports rule for Mockito-2.x as the
current base line

Fix for the proper `BindingProperties` usage
2017-12-21 18:49:41 -05:00
Soby Chacko
73f0fc38a6 Relax Consumer channel binding in AbstractTestBinder
When native decoding is enabled on the consumer, relax the requirement
for using AbstractBinderTest.createBindableChannel(..)

Fixes #1137
Resolves #1138
2017-11-14 08:52:01 -05:00
Jacob Severson
61240fd0fa Adding hook for changing message target delimeter
Resolves #1120
2017-11-12 15:46:29 -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
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
Oleg Zhurakousky
4cc66ae0e0 fixed AbstractBinderTests to take into account previous commit '6eff89ca6c4dfc6ae9e0777e5f97e63c45615afc' 2017-10-26 10:59:23 -04:00
Oleg Zhurakousky
6eff89ca6c Added MessageChannel configuration assertion (#1113)
Added assertion to org.springframework.cloud.stream.binder.AbstractTestBinder to ensure that MessageChannels that are passed to any of the bind methods are configured with Message Interceptors
2017-10-26 10:16:57 -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
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
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
Gary Russell
85f067028c GH-62: Remove Tuple Kryo Registrar Wrapper
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/62

No longer needed.
2017-08-22 12:18:29 -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
6f1bc59ee2 Extracting payload serde code from AbstractBinder into a utility class
Fix #1030
2017-07-26 19:27:23 -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
Marius Bogoevici
18b19fc323 Use distinct consumer groups per test 2017-05-21 10:36:20 -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