- Renamed classes and package to be consistent with the intentions of this binder (e.g., TestChannelBinder, TestChannelBinderConfiguration etc)
- Added package-info.java
Resolves#1241
- moved OriginalContentTypeResolver to avro module
- removed StringConvertingContentTypeResolver as it is no longer referenced anywhere
- deprecated KryoMessageConverter
Resolves#1228
- Merged SmartJsonMessageConverter with ApplicationJsonMessageMarshallingConverter
- Fixed Tests
- Fixed SpringIntegrationChannelBinder to enforce byte[] payload type for polling delegate
- Other minor polishings
Resolves#1197
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
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#1174Resolves#1176
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
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
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
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
- 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
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