Commit Graph

639 Commits

Author SHA1 Message Date
Marius Bogoevici
1b9c72bddb Allow subclasses of AbstractBinder access to deserialization logic 2017-01-26 14:43:39 -05:00
Ilayaperumal Gopinathan
e93a03f792 Update doc for PartitionKeyExtractorClass
- update info on how to access application context

This resolves #631

Update selector binding property doc
2017-01-23 14:18:38 -05:00
Gary Russell
2b66b661df Fix Incorrect Docs for consumer.maxAttempts
It is an absolute number of attempts, not the number of retries.
2017-01-21 17:43:07 -05:00
Maxim Kirilov
2ff48a9367 Reuse MessageConverterConfigurer.PartitionHandler
Fixes spring-cloud/spring-cloud-stream#764 (https://github.com/spring-cloud/spring-cloud-stream/issues/764)

(cherry picked from commit 5faf1d8)
2017-01-17 16:53:14 -05:00
Ilayaperumal Gopinathan
09bde2a770 Log deserialization exception messages
- Log all the exception messages at the deserialization (especially at the codec's decode process)
 - Combine all the exception catches into Exception as the exception messages are almost same and redundant.

Resolves #497

removing duplicate declaration of logger
2017-01-17 11:21:26 -05:00
Janne Valkealahti
9983453b77 Add target caching to BindableProxyFactory
- Prevent new reflection calls to channels
  for Sources, Sinks and Processors, cache bound target
  if it's found and try to use it next time as target
  should not change.
- One test for checking caching.
- Fixes #759
2017-01-16 13:40:15 -05:00
Marius Bogoevici
5cff7ced90 Set version to 1.2.0.BUILD-SNAPSHOT 2017-01-10 17:20:11 -05:00
Marius Bogoevici
f602ae838c Release 1.2.0.M1
Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>
2017-01-10 16:35:44 -05:00
Marius Bogoevici
c39e07d210 Update Spring Cloud Build to 1.3.1.M1 2017-01-10 16:17:21 -05:00
Marius Bogoevici
d5d2cd91d9 Update to 1.3.1.BUILD-SNAPSHOT 2017-01-10 15:06:34 -05:00
Ilayaperumal Gopinathan
aa8c14dcd2 Fix duplicate StreamListener mapping in parameterized classes
- Add test
 - For StreamListener methods, filter out bridge methods

Resolves #683
2017-01-10 14:48:27 -05:00
Ilayaperumal Gopinathan
503e749c19 Fix compilation issue on ObservableToMessageChannelResultAdapter
This resolves #756
2017-01-09 13:56:40 +05:30
Marius Bogoevici
2abac42eba Update to Reactor 3.0.4
Fixes #751

- Use Reactor 3.0.4.RELEASE
- Remove Scheduler implementations that were introduced for fixes
- Shade `io.reactivex:rxjava-reactive-streams` classes to replace removed RxJava1 adapter support

Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>
2017-01-05 15:52:09 -05:00
Marius Bogoevici
98431a6d25 Remove TestRestTemplate bean definition.
Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>
2017-01-04 10:40:31 -05:00
Marius Bogoevici
61c968bba6 Deletes isolated package-info.java 2017-01-04 09:06:11 -05:00
Marius Bogoevici
3d81411f93 Schema deletion additional changes
- fix typo
- Return METHOD_NOT_ALLOWED if schema deletion is disabled
- Tests dirty context to avoid cross-chatter

Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>
2016-12-21 17:03:11 -05:00
Ilayaperumal Gopinathan
5d1cef2715 Add support for schema deletion
- Add REST endpoints for schema deletion
   - by subject, format, version
   - by subject
   - by id

 - Add tests

Resolves #716

Update doc
2016-12-21 17:03:02 -05:00
Ilayaperumal Gopinathan
46fa71d3a5 Add doc for aggregate application namespace prefix
This resolves #747
2016-12-20 19:59:09 +05:30
Marius Bogoevici
f6073ade89 Fix id type on SchemaRegistrationResponse
Fixes #739

Use primitive type in `SchemaRegistryClient`
2016-12-19 21:17:39 +05:30
Marius Bogoevici
4d74212932 Skip deserializePayloadIfNecessary only if originalContentType is not set
Fixes #741

The current code will skip `deserializePayloadIfNecessary` if the
payload is a `byte[]`. There are in fact two conditions that indicate
that a message does not require postprocessing in the binder: that
the payload is not a `byte[]` which indicates that the message has
already been deserialized, and that the `originalContentType` is not
present, or else it'd need to be moved to `contentType`. This fix
adds the secondary condition to the check.
2016-12-18 21:10:34 -05:00
Ilayaperumal Gopinathan
38ba0d3941 Update master to 1.2.0
- Update Spring Cloud Dalston
    - update spring-cloud-build to use 1.3.0.BUILD-SNAPSHOT

This resolves #733
2016-12-16 11:55:31 -05:00
Marius Bogoevici
2667b7be68 Make Reactive autoconfiguration conditional on BindingService 2016-12-16 09:42:26 -05:00
markfisher
9dd2d45c7c StreamListener adapters should be inheritable 2016-12-15 15:21:31 -05:00
Marius Bogoevici
c816b4987d Restore ChannelBindingAutoConfiguration
Having it renamed has broken backwards compatibility with Sleuth

Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>
2016-12-14 18:34:18 -05:00
Marius Bogoevici
c5b9a9f3e7 Refine the behaviour of the defaults map
Fixes #734

- allow mutability
- use Environment directly for configuration

Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>
2016-12-14 11:31:27 +05:30
Ilayaperumal Gopinathan
5ea86e2f53 Remove logback config from spring-cloud-stream-binder-test
Resolves #704

Configure default logging level

Use EnvironmentPostProcessor to set default config props
2016-12-13 18:12:19 -05:00
Marius Bogoevici
8ac71c7b57 Support flexible bound element types
Fixes #519

Introduces some internal changes to the framework allowing the use
of other types than MessageChannel/SubscribableChannel as bindable
types (e.g. Flux, Observable, KStream, etc.)

- Modify BinderFactory to allow the retrieval and lookup of a
  binder not only by name, but also by binding target type
- Subsequent changes to ChannelBindingService and tests to account
  for the modified signature
- Introduce BindingTargetFactory as the contract for creating bound
  elements
- Remove any references to chanels and bound elements and use
  'binding target' systematically across the board

Reinstate our own Checkstyle checks with a reduced set of rules so that header
  validation can be performed automatically at compile time.

Use ${project.version} for the checkstyle plugin configuration

Renaming some occurences of 'boundElement' to 'bindingTarget'

Renamed a stray occurence of 'channel'

Fix some occurences of String concatenation in the same line after reformatting
2016-12-13 13:19:13 -05:00
Marius Bogoevici
8e5689c298 Do not check if the Lifecycle argument is null
Fixes #607

Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>

Address PR comments

- Expand Javadoc
- Rename Lifecycle field

Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>
2016-12-13 10:13:11 +05:30
Marius Bogoevici
b3a0f2c2e1 Add support for defaults at binding level
Fixes #446

Supports properties prefixed with `spring.cloud.stream.default`
for specifying default values for large number of channels or
for dynamically generated channels.

Note: this does not cover binding specific properties,
as the property objects are created under binder's control
but the same technique can be applied there.

Rework default property binding

Minor: javadoc

Updated documentation
2016-12-12 09:30:42 +05:30
Marius Bogoevici
6c861135a3 Improve application aggregation and testability
Fixes #723

- Add support for registering an `AggregateApplication` bean for accessing the
  components from underlying subcontexts
- Testing support and samples

Signed-off-by: Marius Bogoevici <mbogoevici@pivotal.io>

Fix Javadoc
2016-12-04 14:18:38 +05:30
Marius Bogoevici
8fa41a361f Update README.adoc 2016-11-29 17:44:58 -05:00
Toshiaki Maki
0ca7573cc5 Fix broken MessageConverter definition
Fix wrong argument in setSchemaLocation
2016-11-23 09:15:09 -05:00
making
9f067a6907 Add spring-boot-configuration-processor to SCSt schema/server
Add spring.cloud.stream.schemaRegistryClient.enabled
2016-11-23 12:39:39 +05:30
making
6d8cb58bde Fix wrong property for the root path of the schema server 2016-11-23 04:19:42 +09:00
Toshiaki Maki
a97c7b204e Fix wrong artifact 2016-11-22 01:57:21 +09:00
Marius Bogoevici
c6e0c74626 Polishing 2016-11-20 23:01:15 -05:00
Ilayaperumal Gopinathan
453a9b0c10 Align StreamListener method/parameter mappings
- Use the same mapping of method/parameters for both declarative and message handler Stream Listeners
       - Declarative mode of the StreamListener method is determined if at least one of the the method parameters is annotated with @Input or @Output with either bound elements (e.g. channels) or conversion targets from bound elements via a registered StreamListenerParameterAdapter
       - If the method is non-declarative then it is considered to be in message handler mode
       - Declarative mode now accepts @Output annotation at method level as well along with @SendTo
       - Declarative mode also accepts @Input annotation value at the method level via @StreamListener valuue.
       - Message handler mode accepts @Input annotation value at the method parameter level and @Output annotation at the method annotation level
       - Both @Output and @SendTo annotations are supported to specify the outbound target value while @SendTo is allowed only as a method level annotation
       - Add assertions on allowable use of method and parameter annotations

    - Add parameterized tests to cover all possible cases
        - Message handler tests
        - Reactor and RxJava tests

Resolves #664

Add more error handling and simplify the usage patterns

Address review comments

 - Support @Input/@Output only for declarative StreamListener methods
 - Support multiple @Output only when there is no return type in the StreamListener method
 - Add/Update tests

WIP

Refactor PR based on the review comments
2016-11-18 11:07:05 -05:00
Marius Bogoevici
8595d094c9 Fix wrongly pasted line in doc 2016-11-18 10:59:31 -05:00
Vinicius Carvalho
18c894689c Fixes for MySQL and Postgresql
Renamed Table from Schema to SCHEMA_REPOSITORY to avoid potential reserved word clashes with some databases

Postgresql GH-696 requires transactional semantics even for reading operations when using Lob columns

Removed dependency to h2 database. A database driver is now explicitly required when running the server

Resolves #696 and #697
2016-11-18 10:50:02 -05:00
Ilayaperumal Gopinathan
67a3e3c915 Doc updates 2016-11-14 11:54:35 +05:30
Elnur Abdurrakhimov
9b79a7c32a Fix field usage 2016-11-12 10:34:08 +04:00
Ilayaperumal Gopinathan
e7e799b8d8 Support native serialization in MessageChannelBinder
Resolves #691

- If the broker supports native serialization, then the serialization of the
   outbound payload is not done by the binder's producer binding outbound message handler.
- At the consumer binding's inbound message handler, the extraction of embedded headers
   is performed only for the byte[] payload (given the deserialization would have already
   occurred at the broker level)
- Add correspoinding tests in Kafka binder implementation
- Rely on the received message type to decide on using out of the box deserializer (only
   if byte[] message payload is received)
2016-11-04 10:49:12 -04:00
Marius Bogoevici
6c9976b77f Fix EntityPackageScanner to property merge the packagesToScan
Fixes #686

Removing unused imports

Simplify the registration process

- rely on EntityScanPackages.register to properly merge registered packages
- add additional tests validating the process
2016-10-31 13:55:58 +05:30
Marius Bogoevici
18e7f0b47d Minor polishing 2016-10-24 20:21:37 -04:00
Ilayaperumal Gopinathan
6fc6445c4f Support namespace based prefixed properties
- In AggregateApplication, support specifying commandline and environment properties based on namespace for each containing applications using namespace as prefix
  - As usual, command line properties override the environment as well as the properties specified inside the application
2016-10-24 20:02:10 -04:00
Soby Chacko
8c33609f2b Test debugging around receive() in AbstractBinderTests 2016-10-18 20:05:11 -04:00
Ilayaperumal Gopinathan
580e268a97 POM changes to use version name effectively
Remove the use of parent version inside schema
2016-10-17 15:48:39 -04:00
Ilayaperumal Gopinathan
bfad7b81a7 Use asciidoc property to specify spring boot version in Initializr
Address review comments
2016-10-13 13:39:58 -04:00
Ilayaperumal Gopinathan
5d2860bc53 - Fix NPE for wildcard/generic type reactive stream listener @Input type
- Set argumentClass to Object when using wildcard/generic types if the StreamListener method parameter for @Input annotated type uses wildcard/generic type, then set the argumentClass to `Object.class` instead of null.

Resolves #665

Address review comments
2016-10-13 13:23:12 -04:00
Rajiv Jivan
4e3c43af44 Fix typo in the doc
Addresses https://github.com/spring-cloud/spring-cloud-stream/issues/679
2016-10-07 16:24:24 +05:30