Commit Graph

660 Commits

Author SHA1 Message Date
Marius Bogoevici
02fdd7c9dd Add Documentation for @StreamListener Dispatching
Fixes #820

Addressing PR comments
2017-02-21 12:13:52 -05:00
Ilayaperumal Gopinathan
086895f6f8 Fix non self-contained aggregate application binding
- Remove conditionalOnMissingBean check on the necessary beans that are required for exernal bindings of the child application
 - Add test to verify

Resolves #816
2017-02-20 17:38:51 +05:30
Marius Bogoevici
b38a65cdbc AbstractMessageChannelBinder can have a null headers list
Fix #812
2017-02-19 14:12:20 -05:00
Marius Bogoevici
076f0ac1cb Add Dispatching Capabilities to @StreamListener
`@StreamListener` has support for a `condition` parameter,
that contains a SpEL expression that is evaluated before the
method is invoked.

Fix #682

Move StreamListenerMessageHandler as a top level class

Use dispatching and add test

Refactor dispatching mechanism

Throw error when conditions are used in declarative mode

Make StreamListenerAnnotationBeanPostProcessor overridable

Remove unused field in test

Address some PR comments

Add placeholder resolution

Update how multiple matches work with return values

- Methods with return values are not allowed to specify conditions
- If multiple matches are detected (e.g. multiple methods without
  conditions, or a mix of methods with and without conditions)
  checks that all of them have no return value;
2017-02-17 13:47:43 -05:00
Marius Bogoevici
a64860abc8 Copy existing BindingProperties values when replacing bound map
Fix #810
2017-02-16 22:15:58 +05:30
Ilayaperumal Gopinathan
8792423abc Not enforcing EnableAutoConfiguration on aggregate parent
- The aggregate parent configuration now imports the required auto configuration classes such as ChannelBindingAutoConfiguration and EndpointAutoConfiguration
while `@EnableBinding` is still at the parent configuration to be able to share the binding configuration among the child applications
 - Add `ConditionalOnMissingBean` in spring cloud stream auto configuration classes so that if `EnableAutoConfiguration` is enabled at child application classes
they don't get instantiated again
 - Conditionally import EmbeddedServlet auto-configuration when web environment is enabled for parent
 - Add test

Resolves #737
2017-02-16 15:48:52 +00:00
Ilayaperumal Gopinathan
2df9f9b4ee Update PartitionHandler partition properties during initialization
- The PartitionHandler has per-binding partition properties derived from the producer properties for the binding
   - These partition properties (especially PartitionKeyExtractorStrategy and PartitionSelectorStrategy)  need not be initialized when the messages are processed; instead they can be set during the PartitionHandler instantiation
 - Add tests

This resolves #772

Refactor PartitionHandler
2017-02-15 23:17:12 -05:00
Soby Chacko
48c53ef278 Making ProvisioningProvider protected; Javadocs
Fixes #803

Making ProvisioningProvider use a generic type so that subclasses don't have to cast
2017-02-14 13:08:46 -05:00
Gary Russell
51a7f8bf66 RabbitMQ - GH-43 - Support Fix For Routing Key
See spring-cloud/spring-cloud-stream-binder-rabbit#43

Make Routing Key Check Method Name More Expressive
2017-02-13 18:07:00 -05:00
Soby Chacko
392b087af6 Introducing Provisioning SPI
- Provide an API for provisioning middleware specific concerns independent of the binder
 - Make the corresponding changes in AbstractMessageChannelBinder

Fixes #745

Addressing PR review comments

Adding ProvisioningException to the SPI for provisioning

Addressing PR review comments
2017-02-13 15:44:27 -05:00
Marius Bogoevici
a297a0968b Restore support for application/json in TupleJsonMessageConverter
Fixes #793
2017-02-09 16:02:12 -05:00
Marius Bogoevici
d30a98ff61 Fix import order 2017-02-09 12:40:06 -05:00
Marius Bogoevici
f65dcbe975 Add converter for Object->String conversion
Support `text/plain` outbound content type for generic objects

Fix #774
2017-02-09 12:19:31 -05:00
Ilayaperumal Gopinathan
e1171a38f7 Overload EmbeddedHeadersMessageConverter method
- Overload extractHeaders method to accept bytes payload
  - This will help avoiding unnessary message creation during ad-hoc extractHeader invocation
  - add test
2017-02-08 21:51:12 -05:00
Martijn Haex
fe85d180b5 Fix typo for transforming a String message to uppercase. 2017-02-08 12:57:07 -05:00
Marius Bogoevici
8cc49f5d6d Update README.adoc 2017-02-04 11:22:29 -05:00
Marius Bogoevici
6d2114d91c Update README.adoc 2017-02-04 11:22:08 -05:00
Marius Bogoevici
53c2c9694e Update README.adoc 2017-02-04 11:18:38 -05:00
Gary Russell
851d717349 GH-773: Doc Polishing
Resolves #773

Ctor Autowiring and missing end of note.
2017-02-03 09:36:43 -05:00
Marius Bogoevici
61fa26cfc4 Add test for GH-782 fix 2017-02-03 09:33:57 -05:00
Réda Housni Alaoui
28211b71bd "spring.cloud.stream.default" prefix is not used by BindingServiceProperties 2017-02-02 16:11:24 +01:00
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