Commit Graph

804 Commits

Author SHA1 Message Date
Oleg Zhurakousky
0670a36ef2 Polishing DefaultSchemaRegistryClient
- made RestTemplate final
- removed setter

Resolves #1222 #1223
2018-06-11 15:06:38 -04:00
jmaxwell
c23d6ed99e 1222 DefaultSchemaRegistryClient should accept a custom RestTemplate.
Added protected accessors to allow subclasses access to RestTemplate and endpoint fields.
2018-06-11 15:06:17 -04:00
jmaxwell
688d73597c 1218 Inconsistent use of AvroSchemaRegistryClientMessageConverter.AVRO_FORMAT 2018-06-11 14:58:16 -04:00
jmaxwell
30ad6b659a 1215 CachingCachingRegistryClient stores data by wrong keys resulting in fetch operations always missing.
Resolves #1216
2018-06-11 14:53:02 -04:00
jmaxwell
7d5b538009 1202 Inconsistent use of this.prefix in AvroSchemaRegistryClientMessageConverter.resolveSchemaForWriting
Resolves #1202
Resolves #1203
2018-06-11 14:50:10 -04:00
Soby Chacko
48ff2cc620 Next update: 1.3.3.BUILD-SNAPSHOT 2018-01-10 14:15:39 -05:00
Soby Chacko
950c3e0ac3 1.3.2.RELEASE 2018-01-10 13:58:14 -05:00
Oleg Zhurakousky
090df5bd16 polishing
change the name of the test method and remove System.out from the test
2018-01-08 16:24:09 -05:00
Oleg Zhurakousky
2278226074 GH-1153 Fixed consumer to honor channel-bound contentType
- Added SpringIntegration backed test binder
- Added initial binder test suite

Resolves #1153
2018-01-08 15:19:27 -05:00
Oleg Zhurakousky
cc22543778 Removed PostProcessorConfiguration from BindingServiceConfiguration
- substituted BPPs for InitializingBeans removing the possibility of early initialization.

Resolves #1172

backport polishing
2018-01-04 14:08:45 -05:00
Oleg Zhurakousky
e78528c261 polishing after back porting early initialization issues 2018-01-04 08:34:29 -05:00
Oleg Zhurakousky
c00f69d288 Aligned StreamEmitterAnnotationBeanPostProcessor with StreamListenerAnnotationBeanPostProcessor
. . .as part of the effort to fix early initialization of beans inside BeanPostProcessors.

Resolves #1157
2018-01-03 22:43:32 -05:00
Oleg Zhurakousky
6288669d75 polishing BinderAwareRouterBeanPostProcessor
- removed BeanPostProcessor from BinderAwareRouterBeanPostProcessor
- simplified BinderAwareRouterBeanPostProcessor configuration in BindingServiceConfiguration

Resolves #1171
Resolves #1170
2018-01-03 22:37:14 -05:00
Soby Chacko
4aa34d233d Next update version: 1.3.2.BUILD-SNAPSHOT 2017-12-27 12:29:41 -05:00
Soby Chacko
3f79254293 Upgrade to 1.3.1.RELEASE 2017-12-27 09:57:05 -05:00
Soby Chacko
360ef154ae Update spring-cloud-build to 1.3.7.RELEASE 2017-12-26 18:24:01 -05:00
Oleg Zhurakousky
11ea4b3436 1146 Fixed early initialization in StreamListenerAnnotationBeanPostProcessor
Removed autowiring from StreamListenerAnnotationBeanPostProcessor in favor of late-binding callbacks
Fixed tests

Resolves #1146

polished for Java 1.7 compliance
2017-12-15 17:51:27 +01:00
Oleg Zhurakousky
85ede8a3fd General cleanup of StreamListenerAnnotationBeanPostProcessor
- Removed BeanFactoryAware dependency
- Simplified `isDeclarativeMethodParameter` and related operations
2017-12-15 16:20:07 +01:00
Oleg Zhurakousky
25877b3d6e StreamListenerAnnotationBeanPostProcessor refactoring/polishing
Continue the work started in f53ff9585a
- simplified 'isDeclarativeMethodParameter(..) operation of StreamListenerAnnotationBeanPostProcessor
- aligned MessageChannelToInputFluxParameterAdapter and MessageChannelToInputObservableParameterAdapter around the actual Message
2017-12-15 16:16:46 +01:00
Oleg Zhurakousky
dad81c617b 1146 Initial fix for eager initialization in StreamListenerAnnotationBPP
- Removed dependency and callbacks to 'BeanFactoryUtils.beansOfTypeIncludingAncestors' in
    StreamListenerAnnotationBeanPostProcessor in favor of more appropriate and lazy DI
    mechanism provided by Spring.
  - Polishing

polishing as part of the cherry-picking
2017-11-28 08:37:38 -05:00
Oleg Zhurakousky
e5108428d4 GH-1121 Fixed contentType equals logic (#1122)
Fixed contentType equals logic
2017-11-02 13:50:11 -04:00
Gary Russell
cce69a6bd8 KAFKA GH-223: Handle unexpected content type
See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/223

When using native encoding; NPE when no class name derived from the content type.

Do not attempt deserialization if `JavaClassMimeTypeUtils.classNameFromMimeType(contentType)`
returns `null`.

Test case in the Kafka binder.
2017-10-10 14:06:07 -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
Artem Bilan
4c33e5eb58 GH-1083: Disallow reuse bean name for bindings
Resolves spring-cloud/spring-cloud-stream#1083

By default Spring Framework allows beans overriding via the same name.
The binding target definitions (`@Input` and `@Output`) populate beans as well
and when we use the same name for target we end up with unexpected behavior
but without errors.
Since it isn't so obvious via Spring Framework bean definition DSLs
(XML or Java & Annotations) how to override beans with the same name,
that is absolutely easy to use the same value for `@Input` and `@Output`
definitions even in different binding interfaces.
That's hard to analyze fro the target application since mostly
`@Input` and `@Output` produce `MessageChannel` beans.

* Fail fast with the `BeanDefinitionStoreException` when we meet existing
bean definition for the same name
* Add JavaDocs to the `@Input` and `@Output` to explain that their `value`
is a bean name, as well as destination by default

Since `@EnableBinding` is `@Inherited`, the inheritor picks up it from the
super class during configuration class parsing.
The parsing process logic is such that after the root class we go to parse its
super classes, and therefore come back to the `@EnableBinding` again.
In this case we process all the `@Import`s one more time and collect them to
the root `configurationClass`.
Essentially we get a duplication for the `ImportBeanDefinitionRegistrar`s
such as `BindingBeansRegistrar`.
The last one parsed `@EnableBinding` and registers appropriate beans for the
`@Input` and `@Output`, as well as for the binding interface - `BindableProxyFactory`.
But since we have it twice in the `configurationClass` we end up with
`BeanDefinitionStoreException` mentioned before.
That's how Spring Framework works with inheritance for configuration classes
and that's may be why it allows to override beans by default

* Skip parsing `@EnableBinding` one more time if the bean definition for
binding interface is already present in the `registry`
* Fix `AggregateWithMainTest` do not process `@ComponentScan` what causes
picking up the configuration classes for children contexts in the aggregation
* Fix `testBindableProxyFactoryCaching()` do not register `Source` and `Processor`
in the same application context because both of them cause registration for the
`Source.OUTPUT` bean
2017-09-28 13:41:18 -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
11b21d9eec Fixes issue with originalContentTypeHeader
- Fixes #1072
- Added a new ContentTypeResolver that searches for originalContentType
  as well as contentType headers
2017-09-11 09:55:07 -04:00
Soby Chacko
4d8d3ebca5 Remove redundant groupId declaration in the parent scst pom.xml
Fix #971
2017-09-06 11:03:47 -04:00
Ilayaperumal Gopinathan
33e9f6fb11 GH-1043: Add codecov support
* Add codecov support

Resolves #1043

* Remove unwanted service configs from travis

 - Spring Cloud Stream doesn't use Redis/Kafka services as these were originally added to support their binder support in the same repo
2017-09-05 13:38:47 -04:00
Vinicius Carvalho
007594cafd Fixes issue with originalContentType 2017-08-24 20:25:21 -04:00
Artem Bilan
51e7161056 Use Checkstyle configs from src directly
Since we rely on the Checkstyle configs in the `spring-cloud-stream-tools`
module, we really need its artifact if we would like to use it as a
dependency for the `maven-checkstyle-plugin`.
But at the same time it is possible only if we run `package` phase.
During `compile/test` phase we don't have artifact yet and end up with
the error that no property set for Checkstyle.

* Use Checkstyle config files directly for the `maven-checkstyle-plugin`
properties.
This way we don't need any artifact to build in advance
2017-08-22 14:02:57 -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
Gary Russell
0eab8a5fa7 GH-916: MC Binder Producer Error Infrastructure
Initial Commit for GH-916.

- register a pubsub error channel.
- register and subscribe a bridge handler to bridge it to the global error channel.
- pass the error channel to the implementation so it can wire it into the outbound endpoint.
- destroy the infrastructure when unbinding.

Javadoc Polishing

Add test case.

temp update to SI 4.3.12

GH-802 - Error Handling Documentation

Resolves #802
2017-08-22 12:11:32 -04:00
Vinicius Carvalho
3ca2138a32 Minor doc improvements
- Clarifies where @EnableBinding should be used
 - Explains pubsub nature of @StreamListener and computing consumer of
   other SI annotations
 - Moved a comment in relevant section
2017-08-17 11:04:38 -04:00
Ilayaperumal Gopinathan
5ff4886434 Use conversion service when binding default properties
- When binding the default BindingProperties, we use RelaxedDataBinder without any specific conversion service. This makes the `String` to SpEL `Expression` conversion failing when the producer properties such as `partitionKey/SelectorExpression` are bound.
 - Update the underlying conversion service (which includes the SpELConverter via EnableBinding) into RelaxedDataBinder
 - Update test

Resolves #1040
2017-08-17 16:38:38 +05:30
Vinicius Carvalho
7cbd005e79 Adding section on cloudfoundry and VCAP_SERVICES for connection factories 2017-08-03 14:34:04 -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
Vinicius Carvalho
6339521448 Adds instructions on how to use confluent schema client
Fix #1011

Moving confluent config to its own section
2017-07-31 14:47:46 -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
Ilayaperumal Gopinathan
eadcfd26ae Clarify doc on bindable components
Resolves #1019
2017-07-27 09:59:33 -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
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
2910d27e09 Improve support for disabling TestSupportBinderAutoConfiguration
Fixes #573

- Split TestSupportBinderAutoConfiguration into separate configs
  for the binder, binderfactory and message collector.
  This enables to address the testBinder as a regular binder when
  autoconfiguration is disabled, and to ensure that the message
  collector is available when the autoconfiguration is disabled.
- reorganize tests to use the default autoconfiguration options
- add documentation for disabling test binder autoconfiguration
2017-07-17 12:32:32 -04:00